Skip to content

agent: follow the step-down rule when adding helper functions to modules #1796

@nathanjmcdougall

Description

@nathanjmcdougall

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.

Metadata

Metadata

Labels

agentConfiguration updates for LLM coding agents

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions