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

strict = True does not correctly override parent settings #14372

Closed
TylerYep opened this issue Dec 29, 2022 · 1 comment
Closed

strict = True does not correctly override parent settings #14372

TylerYep opened this issue Dec 29, 2022 · 1 comment
Labels
bug mypy got something wrong

Comments

@TylerYep
Copy link

TylerYep commented Dec 29, 2022

Bug Report

To Reproduce
I use the following setup.cfg:

[mypy-apps.*]
allow_untyped_defs = True
allow_incomplete_defs = True

[mypy-apps.new_feature.*]
strict = True
def hello(x) -> None:
     return

Actual Behavior

Success: no issues found in 194 source files.

Expected Behavior

I expected strict=True to override the parent apps.* settings and raise the untyped def error, but it did not unless I manually set the attributes again via:

[mypy-apps.new_feature.*]
ignore_errors = False
strict = True
allow_untyped_calls = True
warn_return_any = False
allow_untyped_defs = False
allow_incomplete_defs = False
apps/new_feature/hello.py:7: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]

Your Environment

  • Mypy version used: mypy 0.991 and 0.812
  • Mypy command-line flags: mypy .
  • Mypy configuration options from mypy.ini (and other config files): See above
  • Python version used: 3.11 and 3.8
@TylerYep TylerYep added the bug mypy got something wrong label Dec 29, 2022
@hauntsaninja
Copy link
Collaborator

Duplicate of #11401

@hauntsaninja hauntsaninja marked this as a duplicate of #11401 Jan 1, 2023
@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants