mirror of https://github.com/Desuuuu/klipper.git
check_whitespace: Minor simplification of control char check
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
7c7de85f01
commit
ac5e207241
|
@ -36,10 +36,9 @@ def check_file(filename):
|
|||
continue
|
||||
# Check for control characters
|
||||
for c in line:
|
||||
oc = ord(c)
|
||||
if oc < 32 or unicodedata.category(c).startswith('C'):
|
||||
if unicodedata.category(c).startswith('C'):
|
||||
char_name = repr(c)
|
||||
if oc == 9:
|
||||
if c == '\t':
|
||||
if os.path.basename(filename).lower() == 'makefile':
|
||||
continue
|
||||
char_name = 'tab'
|
||||
|
|
Loading…
Reference in New Issue