Skip to content

Commit 256f645

Browse files
committed
BUG: Fix minor pattern issues
1 parent 33ff1e6 commit 256f645

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

diff-logs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
r'\bport \d{5,5}\b': 'port 11111', # Remote port
2626
r'\bW/(?P<quote>\\?")[^"]*(?P=quote)': 'W/"ETag"', # ETag header
2727
# Common files
28-
r'/tmp/[^/:"\']{6,}(?:/[^/:"\']+)*/?': '/tmp/d1ff1065',
28+
r'/tmp/[^/:"\'\s]{6,}(?:/[^/:"\'\s]+)*/?': '/tmp/d1ff1065',
2929
# Common tools
3030
r'(?P<step_no>(?:\s|\A)#\d+) \d+\.\d+': r'\g<step_no> 1', # Docker build steps
3131
# strace process PIDs
@@ -37,8 +37,8 @@
3737
r'[a-fA-F0-9]{7,}': 'd1ff1065', # Hash digest
3838
# Progress bar, e.g. in pip, tqdm
3939
r'^(?P<indent>[ \t]*)(?P<pct>\d+%\|)?'
40-
r'(?P<symbol>[━=█])(?P=symbol){4,}(?(pct)\||)'
41-
r'([ \d.,:/\][<]|(MB|kB|B|it)(:?/s)?|eta)*': r'\g<indent>━━━━━',
40+
r'(?P<symbol>[━=█])(?P=symbol){4,} *(?(pct)\||)'
41+
r'(?:[ \d.,:/\][<]|(?:MB|kB|B|it)(?:/s)?|eta)*': r'\g<indent>━━━━━',
4242
}
4343

4444
assert all(re.match(fr'\A(?:{p})\Z', v)

0 commit comments

Comments
 (0)