diff --git a/test-data/unit/check-flags.test b/test-data/unit/check-flags.test index acdee2a10430a..59ca9bc4e4e78 100644 --- a/test-data/unit/check-flags.test +++ b/test-data/unit/check-flags.test @@ -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] @@ -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] @@ -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 diff --git a/test-data/unit/cmdline.test b/test-data/unit/cmdline.test index 7066034b3e39c..53d64f21754e3 100644 --- a/test-data/unit/cmdline.test +++ b/test-data/unit/cmdline.test @@ -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]