Commits

Andrey Vlasovskikh committed 4a38283

Renamed variables shadowing built-ins

  • Participants
  • Parent commits d8744fa

Comments (0)

Files changed (1)

 
 def all_files(basedir):
     for path, dirs, files in os.walk(basedir):
-        for file in files:
-            yield os.path.join(path, file)
+        for filename in files:
+            yield os.path.join(path, filename)
 
 
 def load_yaml_mapping(filename):
     if not page:
         return None
     page['url'] = url
-    filter = file_filters.get(file_suffix(filename))
-    if filter:
-        page['content'] = filter(page['content'])
+    f = file_filters.get(file_suffix(filename))
+    if f:
+        page['content'] = f(page['content'])
     return page
 
 
 
 def generate_files(basedir, destdir, site):
     """Copy static files."""
-    for file in site.get('files', []):
-        src = os.path.join(basedir, file['source'])
-        dst = os.path.join(destdir, url2path(file['url']))
+    for file_dict in site.get('files', []):
+        src = os.path.join(basedir, file_dict['source'])
+        dst = os.path.join(destdir, url2path(file_dict['url']))
         makedirs(os.path.dirname(dst))
         shutil.copy(src, dst)