File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -197,18 +197,19 @@ section of the command line docs.
197
197
198
198
.. confval :: exclude
199
199
200
- :type: newline separated list of regular expressions
200
+ :type: regular expressions
201
201
202
- A newline list of regular expression that matches file names, directory names and paths
202
+ A regular expression that matches file names, directory names and paths
203
203
which mypy should ignore while recursively discovering files to check.
204
204
Use forward slashes on all platforms.
205
205
206
206
.. code-block :: ini
207
207
208
208
[mypy]
209
- exclude =
209
+ exclude = (?x)(
210
210
^file1\.py$
211
- ^file2\.py$
211
+ |^file2\.py$
212
+ )
212
213
213
214
For more details, see :option: `--exclude <mypy --exclude> `.
214
215
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def check_follow_imports(choice: str) -> str:
126
126
'cache_dir' : expand_path ,
127
127
'python_executable' : expand_path ,
128
128
'strict' : bool ,
129
- 'exclude' : lambda s : [p . strip () for p in s . split ( ' \n ' ) if p .strip ()],
129
+ 'exclude' : lambda s : [s .strip ()],
130
130
}
131
131
132
132
# Reuse the ini_config_types and overwrite the diff
Original file line number Diff line number Diff line change @@ -1354,9 +1354,10 @@ b/bpkg.py:1: error: "int" not callable
1354
1354
# cmd: mypy .
1355
1355
[file mypy.ini]
1356
1356
\[mypy]
1357
- exclude =
1358
- abc
1359
- b
1357
+ exclude = (?x)(
1358
+ ^abc/
1359
+ |^b/
1360
+ )
1360
1361
[file abc/apkg.py]
1361
1362
1()
1362
1363
[file b/bpkg.py]
You can’t perform that action at this time.
0 commit comments