Skip to content

Commit d6b53c4

Browse files
committed
change names
1 parent a6fd74c commit d6b53c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/validate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,15 @@ def run(
359359

360360

361361
# 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]')
364364

365365

366366
def _has_invalid_byte(bytes, *, other_whitespaces=False):
367367
if other_whitespaces:
368-
return INVALID_BYTES_WHITESPACE.search(bytes) is not None
368+
return INVALID_BYTES_WITH_OTHER.search(bytes) is not None
369369
else:
370-
return INVALID_BYTES_NO_WHITESPACE.search(bytes) is not None
370+
return INVALID_BYTES.search(bytes) is not None
371371

372372

373373
# assumes that the only possible whitespaces are space and newline

0 commit comments

Comments
 (0)