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

Document that strict does NOT override corresponding flags #18760

Open
andrei-korshikov opened this issue Mar 6, 2025 · 0 comments
Open

Document that strict does NOT override corresponding flags #18760

andrei-korshikov opened this issue Mar 6, 2025 · 0 comments

Comments

@andrei-korshikov
Copy link

Documentation

With e.g. implicit_reexport=True and strict=True the effective value of implicit_reexport is True. It is right behaviour, I think, but it should be documented in https://mypy.readthedocs.io/en/latest/config_file.html#confval-strict and https://mypy.readthedocs.io/en/latest/command_line.html#cmdoption-mypy-strict.

I.e. it should be clearly stated that if both strict and some strict-included flags are set, then strict does not take precedence.


Also, the phrase "enables all optional error checking flags" is very confusing. strict does not enable all optional flags, but a defined subset of them. Look at #7767 (comment) by @hauntsaninja :

mostly the set of checks needed to ensure that you do not have any type unsoundness without an explicit circumvention of the type system, like type ignore, explicit use of Any or cast

Maybe the phrase "enables all optional error checking flags" should be changed to aforementioned definition, or to something like "enables optional flags recommended by python devs", or just deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant