pipx: break `commands.py` into individual files
How would this feature be useful?
commands.py
has grown to be quite large, so breaking it into file names corresponding to the command name will help reduce the barrier to entry for new devs in pipx’s codebase.
Describe the solution you’d like
Make a folder called commands
and in that folder add files corresponding to each pipx command, such as commands/list_command.py
, commands/install_command.py
, etc.
Describe alternatives you’ve considered
Break commands.py
into files in the same directory. This will make it harder to distinguish between libraries, classes and commands though, so I think putting commands in a commands
dir will be the option of least astonishment.
Notes
- Created per suggestion in https://github.com/pipxproject/pipx/pull/246#pullrequestreview-304527855.
- Marking as good first issue because it’s purely a refactor. Existing unit tests should be sufficient.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- moved 'upgrade' and 'upgrade_all' to commands/upgrade.py GH #255: break commands.py into individual files. — committed to ptisserand/pipx by ptisserand 5 years ago
- moved 'upgrade' and 'upgrade_all' to commands/upgrade.py GH #255: break commands.py into individual files. commands: added common.py to remove circular import. Fixed linter issues. — committed to ptisserand/pipx by ptisserand 5 years ago
- moved 'upgrade' and 'upgrade_all' to commands/upgrade.py GH #255: break commands.py into individual files. commands: added common.py to remove circular import. Fixed linter issues. — committed to ptisserand/pipx by ptisserand 5 years ago
- moved 'upgrade' and 'upgrade_all' to commands/upgrade.py (#263) GH #255: break commands.py into individual files. — committed to pypa/pipx by ptisserand 5 years ago
- Merge branch 'master' into #255 — committed to hexcowboy/pipx by deleted user 4 years ago
- Merge branch '#255' of https://github.com/jackno/pipx into #255 — committed to hexcowboy/pipx by deleted user 4 years ago
- Separate commands into separate files (#255) (#382) * Add type annotations to `run_pipx_command()` — committed to pypa/pipx by deleted user 4 years ago
Closed via #382 🎉