File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def split_and_match_files(paths: str) -> list[str]:
126126 Returns a list of file paths
127127 """
128128
129- return split_and_match_files_list (paths . split ( "," ))
129+ return split_and_match_files_list (split_commas ( paths ))
130130
131131
132132def check_follow_imports (choice : str ) -> str :
Original file line number Diff line number Diff line change @@ -1300,6 +1300,22 @@ foo.py:1: error: "int" not callable
13001300[out]
13011301foo/m.py:1: error: "int" not callable
13021302
1303+ [case testCmdlineCfgFilesTrailingComma]
1304+ # cmd: mypy
1305+ [file mypy.ini]
1306+ \[mypy]
1307+ files =
1308+ a.py,
1309+ b.py,
1310+ [file a.py]
1311+ x: str = 'x' # ok
1312+ [file b.py]
1313+ y: int = 'y' # E: Incompatible types in assignment (expression has type "str", variable has type "int")
1314+ [file c.py]
1315+ # This should not trigger any errors, because it is not included:
1316+ z: int = 'z'
1317+ [out]
1318+
13031319[case testCmdlineCfgEnableErrorCodeTrailingComma]
13041320# cmd: mypy .
13051321[file mypy.ini]
You can’t perform that action at this time.
0 commit comments