mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Fix flake8 warnings (#678)
The only notable one here is the regex that had an escape sequence Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Jente Hidskes
parent
836922b133
commit
11db35edba
@@ -26,9 +26,9 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import configparser
|
||||
|
||||
|
||||
def assertIn(element, l):
|
||||
if element not in l:
|
||||
raise AssertionError('{} must be in {}'.format(element, l))
|
||||
@@ -61,7 +61,7 @@ def check_ledtypes_str(string):
|
||||
|
||||
types = string.split(';')
|
||||
for t in types:
|
||||
if not t: # emtpy string if trailing ;
|
||||
if not t: # emtpy string if trailing ;
|
||||
continue
|
||||
|
||||
assertIn(t, permitted_types)
|
||||
@@ -88,7 +88,7 @@ def check_section_device(section):
|
||||
def check_dpi_range_str(string):
|
||||
import re
|
||||
|
||||
m = re.search('^([0-9]+):([0-9]+)@([0-9\.]+)$', string)
|
||||
m = re.search('^([0-9]+):([0-9]+)@([0-9.]+)$', string)
|
||||
assert(m is not None)
|
||||
min = int(m.group(1))
|
||||
max = int(m.group(2))
|
||||
|
||||
Reference in New Issue
Block a user