Title: Auto-scan source root in export-functions hook instead of hard-coding module paths by Copilot · Pull Request #1633 · usethis-python/usethis-python · GitHub
Open Graph Title: Auto-scan source root in export-functions hook instead of hard-coding module paths by Copilot · Pull Request #1633 · usethis-python/usethis-python
X Title: Auto-scan source root in export-functions hook instead of hard-coding module paths by Copilot · Pull Request #1633 · usethis-python/usethis-python
Description: The export-functions hook listed specific module files as positional args in .pre-commit-config.yaml, coupling the config to the project's internal module structure. This rots as modules are added/removed. Hook changes (hooks/export-functions.py) Removed positional source_files argument; now recursively discovers all .py files under --source-root Added --strict flag — fails if any public function lacks a docstring Added AUTO_EXCLUDED set (e.g. _version.py) consistent with export-module-tree.py Scoped to module-level functions via ast.iter_child_nodes() instead of ast.walk() Config change (.pre-commit-config.yaml) Before (18 lines, hard-coded paths): args: - "--output-file=docs/functions.txt" - "--source-root=src" - "src/usethis/_deps.py" - "src/usethis/_console.py" - ... # 11 more hard-coded paths After: args: ["--source-root=src/usethis", "--output-file=docs/functions.txt", "--strict"] Docstrings Added one-line docstrings to 112 public functions across the codebase to comply with --strict docs/functions.txt regenerated: 26 → 191 entries AGENTS.md sync block updated accordingly ✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Open Graph Description: The export-functions hook listed specific module files as positional args in .pre-commit-config.yaml, coupling the config to the project's internal module structure. This rots as modules are ad...
X Description: The export-functions hook listed specific module files as positional args in .pre-commit-config.yaml, coupling the config to the project's internal module structure. This rots as modules ar...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1633
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0721579a-9fe0-a1ad-a14c-074eb353c52d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B83A:2422A3:3777F:49144:6A4DB878 |
| html-safe-nonce | a77bd41c9b9d11466687bbc44376d75318e33344c50885cda1d5bac7d3b662b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODNBOjI0MjJBMzozNzc3Rjo0OTE0NDo2QTREQjg3OCIsInZpc2l0b3JfaWQiOiI2MjI4NjE4MTc3ODE2NjcyMzc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4c8ad5698bdcff67250089813f14428c00d31ef32252e8476bcc91cf912341ca |
| hovercard-subject-tag | pull_request:3463328199 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1633/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | The export-functions hook listed specific module files as positional args in .pre-commit-config.yaml, coupling the config to the project's internal module structure. This rots as modules are ad... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32f7b614aca06e6bbd89842b1370df1328264f68 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width