- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrong
Description
version info
$ mypy --version
mypy 0.620reproduction script
#!/usr/bin/env bash
set -euxo pipefail
mypy --version
rm -rf .mypy_cache
: should pass, no special setting
echo -e 'def f(x) -> str:\n    return ""\n' > t.py
echo -e '[mypy]\n' > mypy.ini
mypy t.py
: should fail, does not
echo -e '[mypy]\ndisallow_incomplete_defs = true' > mypy.ini
mypy t.py
: now it properly fails
rm -rf .mypy_cache
mypy t.pyreproduction output
+ mypy --version
mypy 0.620
+ rm -rf .mypy_cache
+ : should pass, no special setting
+ echo -e 'def f(x) -> str:\n    return ""\n'
+ echo -e '[mypy]\n'
+ mypy t.py
+ : should fail, does not
+ echo -e '[mypy]\ndisallow_incomplete_defs = true'
+ mypy t.py
+ : now it properly fails
+ rm -rf .mypy_cache
+ mypy t.py
t.py:1: error: Function is missing a type annotation for one or more arguments
more obvious file contents
before
[mypy]def f(x) -> str:
    return ""after
[mypy]
disallow_incomplete_defs = truedef f(x) -> str:
    return ""Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong