1
0
forked from drath/libratbag

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:
Peter Hutterer
2019-03-12 15:49:54 +10:00
committed by Jente Hidskes
parent 836922b133
commit 11db35edba
3 changed files with 8 additions and 11 deletions

View File

@@ -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))