Title: hooks: include private functions in export-functions.py by default; add --skip-private flag by Copilot · Pull Request #1842 · usethis-python/usethis-python · GitHub
Open Graph Title: hooks: include private functions in export-functions.py by default; add --skip-private flag by Copilot · Pull Request #1842 · usethis-python/usethis-python
X Title: hooks: include private functions in export-functions.py by default; add --skip-private flag by Copilot · Pull Request #1842 · usethis-python/usethis-python
Description: Private helpers with docstrings were invisible to agents because export-functions.py unconditionally skipped any function starting with _. This meant reusable utilities like _get_current_python_version() were absent from docs/functions.txt and therefore from the Function Reference in AGENTS.md. Changes hooks/export-functions.py: Adds --skip-private flag (default: off). Without the flag, all functions with docstrings — public and private — are exported. --strict only enforces docstrings on public functions; private functions without docstrings are silently omitted. docs/functions.txt: Regenerated — ~37 additional private helpers now included. AGENTS.md: Sync block updated with the new entries. src/usethis/_file/yaml/update.py: Fixed __eq__ → `__eq__` in docstring to prevent a prettier ↔ fix-doc-sync formatting cycle. tests/hooks/test_export_functions.py: 20 new tests covering the public/private inclusion logic, --skip-private, --strict behaviour, and edge cases. Example # Default: export everything with a docstring uv run hooks/export-functions.py --source-root=src/usethis --output-file=docs/functions.txt # Old behaviour: skip private functions uv run hooks/export-functions.py --source-root=src/usethis --output-file=docs/functions.txt --skip-private
Open Graph Description: Private helpers with docstrings were invisible to agents because export-functions.py unconditionally skipped any function starting with _. This meant reusable utilities like _get_current_python_ver...
X Description: Private helpers with docstrings were invisible to agents because export-functions.py unconditionally skipped any function starting with _. This meant reusable utilities like _get_current_python_ver...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1842
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:424e3e6f-52ba-21f7-0e3c-f0ce5b4df538 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D764:3FCB4A:15D1177:1F8C132:6A4CEA27 |
| html-safe-nonce | 541b7391e419c803f83aa66f3ba4e8ecc12697bbccf12431ea0b563582cf6d55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzY0OjNGQ0I0QToxNUQxMTc3OjFGOEMxMzI6NkE0Q0VBMjciLCJ2aXNpdG9yX2lkIjoiNzg1MTkxNjc5MTIxNTA5MDIxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e626217caaa291a72b04a13e26af23b7921182fb645349928163d6443fa2588d |
| hovercard-subject-tag | pull_request:3496380339 |
| 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/1842/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 | Private helpers with docstrings were invisible to agents because export-functions.py unconditionally skipped any function starting with _. This meant reusable utilities like _get_current_python_ver... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| 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 | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width