Add flake8-comprehensions
This commit is contained in:
parent
1981239478
commit
248a12a8b9
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
flake8==3.5.0
|
flake8==3.5.0
|
||||||
flake8-builtins==1.0
|
flake8-builtins==1.0
|
||||||
|
flake8-comprehensions==1.4.1
|
||||||
flake8-copyright==0.2.0
|
flake8-copyright==0.2.0
|
||||||
flake8-debugger==3.0.0
|
flake8-debugger==3.0.0
|
||||||
flake8-deprecated==1.3
|
flake8-deprecated==1.3
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
flake8
|
flake8
|
||||||
flake8-builtins
|
flake8-builtins
|
||||||
|
flake8-comprehensions
|
||||||
flake8-copyright
|
flake8-copyright
|
||||||
flake8-debugger
|
flake8-debugger
|
||||||
flake8-deprecated
|
flake8-deprecated
|
||||||
|
@ -221,7 +221,7 @@ class AbstractWebElement(collections.abc.MutableMapping):
|
|||||||
}
|
}
|
||||||
relevant_classes = classes[self.tag_name()]
|
relevant_classes = classes[self.tag_name()]
|
||||||
for klass in self.classes():
|
for klass in self.classes():
|
||||||
if any([klass.strip().startswith(e) for e in relevant_classes]):
|
if any(klass.strip().startswith(e) for e in relevant_classes):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -502,8 +502,8 @@ class _Downloader:
|
|||||||
This is needed if a download finishes before attaching its
|
This is needed if a download finishes before attaching its
|
||||||
finished signal.
|
finished signal.
|
||||||
"""
|
"""
|
||||||
items = set((url, item) for url, item in self.pending_downloads
|
items = {(url, item) for url, item in self.pending_downloads
|
||||||
if item.done)
|
if item.done}
|
||||||
log.downloads.debug("Zombie downloads: {}".format(items))
|
log.downloads.debug("Zombie downloads: {}".format(items))
|
||||||
for url, item in items:
|
for url, item in items:
|
||||||
self._finished(url, item)
|
self._finished(url, item)
|
||||||
|
@ -102,8 +102,8 @@ class NeighborList(collections.abc.Sequence):
|
|||||||
if items:
|
if items:
|
||||||
item = min(items, key=lambda tpl: abs(self.fuzzyval - tpl[1]))
|
item = min(items, key=lambda tpl: abs(self.fuzzyval - tpl[1]))
|
||||||
else:
|
else:
|
||||||
sorted_items = sorted([(idx, e) for (idx, e) in
|
sorted_items = sorted(((idx, e) for (idx, e) in
|
||||||
enumerate(self.items)], key=lambda e: e[1])
|
enumerate(self.items)), key=lambda e: e[1])
|
||||||
idx = 0 if offset < 0 else -1
|
idx = 0 if offset < 0 else -1
|
||||||
item = sorted_items[idx]
|
item = sorted_items[idx]
|
||||||
self._idx = item[0]
|
self._idx = item[0]
|
||||||
|
@ -61,7 +61,7 @@ def main():
|
|||||||
|
|
||||||
for root, _dirs, _files in os.walk(os.getcwd()):
|
for root, _dirs, _files in os.walk(os.getcwd()):
|
||||||
path = os.path.basename(root)
|
path = os.path.basename(root)
|
||||||
if any([fnmatch.fnmatch(path, e) for e in recursive_lint]):
|
if any(fnmatch.fnmatch(path, e) for e in recursive_lint):
|
||||||
remove(root)
|
remove(root)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user