Skip to content

Commit 34fb4b5

Browse files
Update typeshed stub redaction logic (#183)
1 parent 824dc85 commit 34fb4b5

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
@@ -504,7 +504,7 @@ def _redact_base_dir(output: str, base_dir: Path) -> str:
504504
r"^(?P<header>[^:]*?)"
505505
f"(?:{re.escape(str(base_dir.resolve()))}"
506506
f"|{re.escape(str(base_dir))})"
507-
r"(?:[^:]*?_(new|old)/)?(?P<trailer>[^:\s]*(:|$))"
507+
r"(?:[^:]*?(new|old)[^/]*/)?(?P<trailer>[^:\s]*(:|$))"
508508
)
509509
return re.sub(base_dir_re, r"\g<header>...\g<trailer>", output, flags=re.MULTILINE)
510510

0 commit comments

Comments
 (0)