Skip to content

Conversation

gvanrossum
Copy link
Member

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 August 23, 2017 21:49
mypy/main.py Outdated
@@ -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" %
Copy link
Member Author

Choose a reason for hiding this comment

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

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.)

Copy link
Collaborator

@ddfisher ddfisher left a comment

Choose a reason for hiding this comment

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

LGTM!

@ddfisher ddfisher merged commit f1fbb1e into python:master Aug 25, 2017
@gvanrossum gvanrossum deleted the warn-unused-configs branch August 25, 2017 18:06
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