Skip to content

Commit e55b399

Browse files
committed
tweak regex to match a little less
1 parent 77e984a commit e55b399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy_primer/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def _get_diff(self) -> str:
521521
r"^(?P<header>[^:]*?)"
522522
f"(?:{re.escape(str(ctx.get().base_dir.resolve()))}"
523523
f"|{re.escape(str(ctx.get().base_dir))})"
524-
"[^:]*(?P<trailer>(:|$))"
524+
r"[^:\s]*(?P<trailer>(:|$))"
525525
)
526526
old_output = re.sub(
527527
base_dir_re, r"\g<header>...\g<trailer>", old_output, flags=re.MULTILINE

0 commit comments

Comments
 (0)