-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Closed
Copy link
Labels
bugmypy got something wrongmypy got something wrongtopic-configurationConfiguration files and flagsConfiguration files and flags
Description
# mypy: disable-error-code=name-defined python-verion="3.6"
a # error: Name "a" is not defined [name-defined]
But if I include it in the config file it gives a warning:
[[tool.mypy.overrides]]
module = ["test"]
disable_error_code = "name-defined"
python_verion="3.6"
> mypy test.py
pyproject.toml: [module = "test"]: Per-module sections should only specify per-module flags (disable_error_code, python_version)
test.py:3:1: error: Name "a" is not defined [name-defined]
Found 1 error in 1 file (checked 1 source file)
This is inconsistent with having a invalid option inline:
# mypy: AMONGUS
> mypy test.py
test.py:1:1: error: Unrecognized option: amongus = True [misc]
Found 1 error in 1 file (checked 1 source file)
DetachHead, simonwahlgren, CyberFoxar, duburcqa and glebignatieff
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-configurationConfiguration files and flagsConfiguration files and flags