-
Notifications
You must be signed in to change notification settings - Fork 95
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
Merge dev to master #181
Merge dev to master #181
Conversation
self.cli_ctx.only_show_errors = True | ||
return 1 | ||
if CLILogging.DEBUG_FLAG in args: | ||
self.cli_ctx.only_show_errors = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.cli_ctx.only_show_errors = False [](start = 12, length = 37)
It seems not necessary, I think by default it is false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is to make sure the config is overridden by --debug
. If the config is only_show_errors=True
, --debug
will revert it to False
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you has check debug cannot be set while only_show_errors set
In reply to: 394914515 [](ancestors = 394914515)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check at L136 is only to check the argument --only-show-errors
. It doesn't raise error when the config has the only_show_errors=True
. In this case, self.cli_ctx.only_show_errors
is reverted by the --debug
argument.
self.cli_ctx.only_show_errors = False | ||
return 3 | ||
if self.cli_ctx.only_show_errors: | ||
return 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this code possible reached, I think it already return 1 in ( if CLILogging.ONLY_SHOW_ERRORS_FLAG in args )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This takes effect when no explicit --verbose
, --debug
or --only-show-warnings
is given, but only_show_errors
is specified in the config. You may refer to tests/test_log.py
for a enumeration of possible scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR includes changes from these PRs:
--only-show-errors
(Support --only-show-errors #179)