Title: agent: follow the step-down rule when adding helper functions to modules · Issue #1796 · usethis-python/usethis-python · GitHub
Open Graph Title: agent: follow the step-down rule when adding helper functions to modules · Issue #1796 · usethis-python/usethis-python
X Title: agent: follow the step-down rule when adding helper functions to modules · Issue #1796 · usethis-python/usethis-python
Description: During PR review of the .python-version inference work, a new private helper _get_current_python_version() was placed above its only caller get_supported_minor_python_versions() in src/usethis/_integrations/environ/python.py. This violat...
Open Graph Description: During PR review of the .python-version inference work, a new private helper _get_current_python_version() was placed above its only caller get_supported_minor_python_versions() in src/usethis/_int...
X Description: During PR review of the .python-version inference work, a new private helper _get_current_python_version() was placed above its only caller get_supported_minor_python_versions() in src/usethis/_int...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/1796
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"agent: follow the step-down rule when adding helper functions to modules","articleBody":"During PR review of the `.python-version` inference work, a new private helper `_get_current_python_version()` was placed **above** its only caller `get_supported_minor_python_versions()` in `src/usethis/_integrations/environ/python.py`. This violates the step-down rule: callers should appear before their callees so that the module reads top-to-bottom like a newspaper.\\n\\nWhen agents add new helper functions to existing modules they should check where the caller is defined and place the helper **below** it, not at the top of the file.","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2026-04-04T00:28:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1796/usethis-python/issues/1796"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1a2449c4-3ab6-cad7-4d55-ce8acf0e937a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A90A:2D2253:AC1618:F175F1:6A4C9F24 |
| html-safe-nonce | 4ee3fdf40bd766e04cd3d212ea1513b0c4b6b61811fb10a0136331aeac45999a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTBBOjJEMjI1MzpBQzE2MTg6RjE3NUYxOjZBNEM5RjI0IiwidmlzaXRvcl9pZCI6IjQyMjM0MDMyNDI3MzI0MjkwOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 51ca9774d8855b3311d750314141727564e56ac8a387d7b8961a2b3f9fc12007 |
| hovercard-subject-tag | issue:4202739042 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/usethis-python/usethis-python/1796/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2cc5e0221e284756b1c643dab76182f336710040a1a1ec641ee40b0e964e392f/usethis-python/usethis-python/issues/1796 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2cc5e0221e284756b1c643dab76182f336710040a1a1ec641ee40b0e964e392f/usethis-python/usethis-python/issues/1796 |
| og:image:alt | During PR review of the .python-version inference work, a new private helper _get_current_python_version() was placed above its only caller get_supported_minor_python_versions() in src/usethis/_int... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width