Browse Source

[plugins] fix style issues

snermolaev 1 year ago
parent
commit
d815c46d91
2 changed files with 5 additions and 3 deletions
  1. 2 2
      build/plugins/_common.py
  2. 3 1
      build/plugins/ssqls.py

+ 2 - 2
build/plugins/_common.py

@@ -26,8 +26,8 @@ def pathid(path):
     return six.ensure_str(base64.b32encode(hashlib.md5(six.ensure_binary(path)).digest()).lower().strip(b'='))
     return six.ensure_str(base64.b32encode(hashlib.md5(six.ensure_binary(path)).digest()).lower().strip(b'='))
 
 
 
 
-def listid(l):
-    return pathid(str(sorted(l)))
+def listid(items):
+    return pathid(str(sorted(items)))
 
 
 
 
 def unpair(lst):
 def unpair(lst):

+ 3 - 1
build/plugins/ssqls.py

@@ -23,7 +23,9 @@ class SSQLSParser(object):
 
 
     @staticmethod
     @staticmethod
     def parse_doc(doc):
     def parse_doc(doc):
-        paths = lambda nodes: filter(None, (e.get('path') for e in nodes))
+        def paths(nodes):
+            return [x for x in (e.get('path') for e in nodes) if x]
+
         includes = doc.findall('include')
         includes = doc.findall('include')
         ancestors = paths(doc.findall('ancestors/ancestor'))
         ancestors = paths(doc.findall('ancestors/ancestor'))
         headers = [e.text.strip('<>""') for e in includes]
         headers = [e.text.strip('<>""') for e in includes]