Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor subcommands #264

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Refactor subcommands #264

wants to merge 5 commits into from

Conversation

exhuma
Copy link

@exhuma exhuma commented May 1, 2019

As mentioned in #263, this is a refactoring for subcommands.

Let me know what you think. It builds on top of my code from #263 so this also includes the commit of the info --version command. I kept them separate in case this refactoring is not something you like in terms of code-style.

exhuma added 5 commits May 1, 2019 11:50
This change yanks out each subcommand from `flit/__init__.py` and moves
them to an isolated file in `flit/subcommand`. Additionally,
`flit.subcommand.register` has been implemented to dynamically load
these subcommands and make them available via argparse. See
`flit/subcommand/__init__.py` for details.

This could have been implemented as classes/subclasses which would avoid
import caching and aid testing, but, in my opinion the structure with
modules is simpler.
The "stderr" stream was redirected to stdout which made the test not
representative of the intended use-case and also caused issues on travis
@earonesty
Copy link

earonesty commented Oct 23, 2019

nicely organized, and lots of tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants