-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
disallow-untyped-defs vs disallow_incomplete_defs doc inconsistency #9963
Labels
Comments
The config file docs seems correct. Let's assume def f(x, y: int) -> str: pass Now this is what I get:
|
👋 @JukkaL there is some inconsistency in this doc for sure, let's try to get to the bottom of that. Is this the expected behaviour: ➜ test_mypy cat t.py
def f(x, y: int) -> str: pass
➜ test_mypy mypy --disallow-untyped-defs --allow-incomplete-defs t.py
t.py:1: error: Function is missing a type annotation for one or more arguments
Found 1 error in 1 file (checked 1 source file)
(➜ test_mypy mypy --allow-untyped-defs --allow-incomplete-defs t.py
Success: no issues found in 1 source file
➜ test_mypy mypy --allow-untyped-defs --disallow-incomplete-defs t.py
t.py:1: error: Function is missing a type annotation for one or more arguments
Found 1 error in 1 file (checked 1 source file)
➜ test_mypy mypy --disallow-untyped-defs --disallow-incomplete-defs t.py
t.py:1: error: Function is missing a type annotation for one or more arguments
Found 1 error in 1 file (checked 1 source file) |
The difference between the two is what they would do on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_untyped_defs says:
Notice the extra
or with incomplete type annotations
.and https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_incomplete_defs says:
While https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-disallow-untyped-defs says:
and https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-disallow-incomplete-defs says:
I believe the version from
command_line
doc is the correct one, andconfig_file
doc should be updated.The text was updated successfully, but these errors were encountered: