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

Merge dev to master #181

Merged
merged 3 commits into from
Mar 20, 2020
Merged

Merge dev to master #181

merged 3 commits into from
Mar 20, 2020

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Mar 16, 2020

This PR includes changes from these PRs:

self.cli_ctx.only_show_errors = True
return 1
if CLILogging.DEBUG_FLAG in args:
self.cli_ctx.only_show_errors = False

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

Copy link
Member Author

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.

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)

Copy link
Member Author

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

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 )

Copy link
Member Author

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.

Copy link

@qianwens qianwens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

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