Skip to content

Document that strict does NOT override corresponding flags #18760

Open
@andrei-korshikov

Description

@andrei-korshikov

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions