Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions test-data/unit/check-flags.test
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,10 @@ if BLAH:
[file mypy.ini]
\[mypy]
ignore_missing_imports = True
always_true = YOLO1, YOLO
# Keep `YOLO` last to verify it is parsed when the list has a trailing comma.
always_true =
YOLO1,
YOLO,
always_false = BLAH, BLAH1
[builtins fixtures/bool.pyi]

Expand Down Expand Up @@ -1663,7 +1666,10 @@ def bar():
pass
[file mypy.ini]
\[mypy]
disable_error_code = import, no-untyped-def
# Keep `no-untyped-def` last to verify it is parsed when the list has a trailing comma.
disable_error_code =
import,
no-untyped-def,


[case testDisableErrorCodeConfigFilePyProjectTOML]
Expand Down Expand Up @@ -2529,7 +2535,11 @@ if foo: ... # E: Function "foo" could always be true in boolean context
42 + "no" # type: ignore
[file mypy.ini]
\[mypy]
enable_error_code = ignore-without-code, truthy-bool, used-before-def
# Keep `truthy-bool` last to verify it is parsed when the list has a trailing comma.
enable_error_code =
used-before-def,
ignore-without-code,
truthy-bool,

\[mypy-tests.*]
disable_error_code = ignore-without-code
Expand Down
26 changes: 0 additions & 26 deletions test-data/unit/cmdline.test
Original file line number Diff line number Diff line change
Expand Up @@ -1210,32 +1210,6 @@ y: int = 'y' # E: Incompatible types in assignment (expression has type "str",
z: int = 'z'
[out]

[case testCmdlineCfgEnableErrorCodeTrailingComma]
# cmd: mypy .
[file mypy.ini]
\[mypy]
enable_error_code =
truthy-bool,
redundant-expr,
[out]

[case testCmdlineCfgDisableErrorCodeTrailingComma]
# cmd: mypy .
[file mypy.ini]
\[mypy]
disable_error_code =
misc,
override,
[out]

[case testCmdlineCfgAlwaysTrueTrailingComma]
# cmd: mypy .
[file mypy.ini]
\[mypy]
always_true =
MY_VAR,
[out]

[case testCmdlineCfgModulesTrailingComma]
# cmd: mypy
[file mypy.ini]
Expand Down
Loading