File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -359,15 +359,15 @@ def run(
359
359
360
360
361
361
# Checks if byte is printable or whitespace
362
- INVALID_BYTES_NO_WHITESPACE = re .compile (b'[^\n \x20 -\x7E ]' )
363
- INVALID_BYTES_WHITESPACE = re .compile (b'[^\t \r \v \f \n \x20 -\x7E ]' )
362
+ INVALID_BYTES_WITH_OTHER = re .compile (b'[^\t \r \v \f \n \x20 -\x7E ]' )
363
+ INVALID_BYTES = re .compile (b'[^\n \x20 -\x7E ]' )
364
364
365
365
366
366
def _has_invalid_byte (bytes , * , other_whitespaces = False ):
367
367
if other_whitespaces :
368
- return INVALID_BYTES_WHITESPACE .search (bytes ) is not None
368
+ return INVALID_BYTES_WITH_OTHER .search (bytes ) is not None
369
369
else :
370
- return INVALID_BYTES_NO_WHITESPACE .search (bytes ) is not None
370
+ return INVALID_BYTES .search (bytes ) is not None
371
371
372
372
373
373
# assumes that the only possible whitespaces are space and newline
You can’t perform that action at this time.
0 commit comments