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

Add --warn-unused-configs flag #3865

Merged
merged 2 commits into from Aug 25, 2017

Conversation

Projects
None yet
2 participants
@gvanrossum
Copy link
Member

commented Aug 23, 2017

This is handy for debugging misspellings in mypy.ini, and other mishaps due to e.g. file moves.

@gvanrossum gvanrossum requested a review from ddfisher Aug 23, 2017

@@ -53,6 +53,11 @@ def main(script_path: Optional[str], args: Optional[List[str]] = None) -> None:
a = e.messages
if not e.use_stdout:
serious = True
if options.warn_unused_configs and options.unused_configs:
print("warning: unused section(s) in %s: %s" %

This comment has been minimized.

Copy link
@gvanrossum

gvanrossum Aug 23, 2017

Author Member

Note that the warning goes to stderr but doesn't get routed via the Errors object so it doesn't get included in the junit.xml file (if we write it). Then again it's not associated with any particular file, and I'm not sure if the Error class supports such errors. (All other warnings related to the config file also just go to stderr directly.)

@ddfisher
Copy link
Collaborator

left a comment

LGTM!

@ddfisher ddfisher merged commit f1fbb1e into python:master Aug 25, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gvanrossum gvanrossum deleted the gvanrossum:warn-unused-configs branch Aug 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.