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

Allow disabling active config files. #6664

Merged
merged 3 commits into from Apr 12, 2019

Conversation

@brandtbucher
Copy link
Contributor

commented Apr 11, 2019

With this change, passing --config-file= from the command line disables any active config files.

Allow disabling active config files.
With this change, passing `--config-file=` from the command line disables any active config files.
@gvanrossum

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Why not use /dev/null?

@brandtbucher

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

$ mypy --config-file /dev/null .
/dev/null: No [mypy] section in config file

This cuts down on unnecessary noise, and to me it personally feels like less of a hack.

@ethanhs
Copy link
Collaborator

left a comment

I think this makes sense. In addition, you won't have to remember NUL vs /dev/null. Maybe we should document this behavior if we merge this?

@gvanrossum

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

OK, this sounds like a good idea. But yeah, please update the docs. Also please add a unittest to test-data/unit/check-flags.test, e.g. show that options in mypy.ini are ignored with --config-file=.

@brandtbucher

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2019

Ok, added documentation and testing!

@gvanrossum
Copy link
Member

left a comment

Thanks! All looks good.

@ilevkivskyi ilevkivskyi merged commit 75d4686 into python:master Apr 12, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.