-
-
Notifications
You must be signed in to change notification settings - Fork 301
Make command required #48
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
Conversation
without enforcing subcommand, exception would be raised when running `cz -n test` or `cz --debug`
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
=========================================
Coverage ? 93.15%
=========================================
Files ? 25
Lines ? 555
Branches ? 0
=========================================
Hits ? 517
Misses ? 38
Partials ? 0
Continue to review full report at Codecov.
|
What problem do you see with By default if no command is provided the help is shown, check the first comment inside the |
In order to avoid a breaking change we can add a warning for the import warnings
warnings.warn("--version will be no longer available in next major release", category=DeprecationWarning) |
In this case, maybe we can create another PR for the warning and add version to command. We can merge this PR when 2.0 is to released. Does it make sense to you? |
But why not having both? So people can transition. And in the next major
release we just remove `--version`.
…On Sat, Nov 9, 2019, 14:45 Wei Lee ***@***.***> wrote:
In this case, maybe we can create another PR for the warning and add
version to command. We can merge this PR when 2.0 is to released. Does it
make sense to you?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#48>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATXJWEGHPRRTNL42IUHKADQS25IBANCNFSM4JKXQSWA>
.
|
Yes, we'll have both. What's in my mind is how to remind us that we need to add back the constraint when we're to release 2.0. |
Currently, if no command is provided, the user will see the "help" information, do we want to show an error instead? I don't see the use of this constraint, why do you think it would be useful to us? Thanks |
Okay got it, makes sense. I think we can comment the line and add a |
…traint these changes will apply when move into 2.0
I've add the TODO and add |
#47
--version
into a commandIn the original design, there are 3 arguments
--version
,--debug
,--name NAME
.The later two commands usually come with commands (e.g.,
ls
,commit
).Therefore, I make
--version
a command.There are two concern for me in this PR.
TypeError
handles the case that command is not given.