Skip to content

Commit 5888f74

Browse files
committed
Use re.search so pattern is matched across the whole path
1 parent cbe87e9 commit 5888f74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylsp_mypy/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def pylsp_lint(
187187
# exclude = ["tests/*"]
188188
exclude = settings.get("exclude", [])
189189
for pattern in exclude:
190-
if re.match(pattern, document.path):
190+
if re.search(pattern, document.path):
191191
log.debug(
192192
f"Not running because {document.path} matches " f"exclude pattern '{pattern}'"
193193
)

0 commit comments

Comments
 (0)