fix flake8 errors
This commit is contained in:
parent
e08565609e
commit
9c32d18607
@ -63,7 +63,7 @@ class Export(object):
|
||||
|
||||
def get_normalized(self, name, default=None):
|
||||
value = self.get(name, default=default)
|
||||
if not value in [None, default]:
|
||||
if value not in [None, default]:
|
||||
value = str(value).lower().strip()
|
||||
return value
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ class CSVSerializer(Serializer):
|
||||
|
||||
def write(self, path, result):
|
||||
keys = list(result.keys())
|
||||
if not path in self.handles:
|
||||
if path not in self.handles:
|
||||
fh = open(path, 'wb')
|
||||
writer = csv.writer(fh)
|
||||
writer.writerow([k.encode('utf-8') for k in keys])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#coding: utf-8
|
||||
# coding: utf-8
|
||||
import re
|
||||
|
||||
SLUG_REMOVE = re.compile(r'[,\s\.\(\)/\\;:]*')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user