Dobrosław Żybort avatar Dobrosław Żybort committed 67fde9f

fix: pep8 E122 continuation line missing indentation or outdented

Comments (0)

Files changed (8)

 
         i = 0
         while i < len(self.items)\
-        and self.__item_older(item, self.items[i]) > 0:
+                and self.__item_older(item, self.items[i]) > 0:
             i = i + 1
 
         if i < self.__maxitems:

lazygal/generators.py

             subgal_sorter = \
                 lambda x, y: x.source_dir.compare_mtime(y.source_dir)
         elif self.webgal_dir.subgal_sort_by[0] == 'dirname'\
-        or self.webgal_dir.subgal_sort_by[0] == 'filename':  # Backward compatibility
+                or self.webgal_dir.subgal_sort_by[0] == 'filename':  # Backward compatibility
             subgal_sorter = \
                 lambda x, y: x.source_dir.compare_filename(y.source_dir)
         else:
         medias_amount = len(self.webgal_dir.medias)
         how_many_pages = medias_amount // self.webgal_dir.thumbs_per_page
         if medias_amount == 0\
-        or medias_amount % self.webgal_dir.thumbs_per_page > 0:
+                or medias_amount % self.webgal_dir.thumbs_per_page > 0:
             how_many_pages = how_many_pages + 1
 
         for page_number in range(0, how_many_pages):
         self.thumbs_per_page = self.config.getint('webgal', 'thumbs-per-page')
 
         if self.config.getboolean('webgal', 'dirzip')\
-        and self.source_dir.get_media_count() > 1:
+                and self.source_dir.get_media_count() > 1:
             self.dirzip = genfile.WebalbumArchive(self)
             self.add_dependency(self.dirzip)
         else:
             # Do not append default size name to HTML page filename
             return path
         elif size_name in self.browse_sizes\
-        and self.newsizers[size_name] == 'original'\
-        and extension != '.html':
+                and self.newsizers[size_name] == 'original'\
+                and extension != '.html':
             # Do not append size_name to unresized images.
             return path
         else:
     def should_be_flattened(self, path=None):
         if path is None: path = self.source_dir.path
         return self.album.dir_flattening_depth is not False\
-        and self.source_dir.get_album_level(path) > self.album.dir_flattening_depth
+            and self.source_dir.get_album_level(path) > self.album.dir_flattening_depth
 
     def flatten_below(self):
         if self.album.dir_flattening_depth is False:
 
         for dependency in self.deps:
             if dependency.get_mtime() > self.get_mtime()\
-            or dependency.needs_build():
+                    or dependency.needs_build():
                 if not dependency.is_dep_only():
                     if return_culprit:
                         mtime_gap = dependency.get_mtime() - self.get_mtime()

lazygal/metadata.py

 
         md_data = md.get(None, self.source_dir)
         if 'album_description' in md_data.keys()\
-        or 'album_name' in md_data.keys():
+                or 'album_name' in md_data.keys():
             logging.debug(_("  SKIPPED because metadata exists."))
         elif self.source_dir.get_all_medias_count() < 1:
             logging.debug(_("  SKIPPED because directory does not contain images."))

lazygal/newsize.py

 resize_patterns = []
 for name, obj in globals().items():
     if not name.startswith('_')\
-    and isinstance(obj, (type, types.ClassType)) and issubclass(obj, _Newsize):
+            and isinstance(obj, (type, types.ClassType))\
+            and issubclass(obj, _Newsize):
         resize_patterns.append(obj)
 
 

lazygal/sourcetree.py

         if self.has_reliable_date() and other_media.has_reliable_date():
             return self.compare_date_taken(other_media)
         elif not self.has_reliable_date()\
-        and not other_media.has_reliable_date():
+                and not other_media.has_reliable_date():
             return self.compare_filename(other_media)
         else:
             # One of the picture has no EXIF date, so we arbitrary sort it
                 if kind is START:
                     tag, attrib = data
                     if tag.namespace == 'http://www.w3.org/2001/XInclude'\
-                    and tag.localname == 'include':
+                            and tag.localname == 'include':
                         subtpl_ident = attrib.get('href')
                         try:
                             subtpl = self.loader.load(subtpl_ident)
                                    (os.path.normpath(sys.executable),
                                     post_interp))
                     else:
-                        outf.write("#!%s%s\n" %
-                                   (os.path.join(
-                            distutils.sysconfig.get_config_var("BINDIR"),
-                            "python" + distutils.sysconfig.get_config_var("EXE")),
-                                    post_interp))
+                        outf.write(
+                            "#!%s%s\n" %
+                            (os.path.join(
+                             distutils.sysconfig.get_config_var("BINDIR"),
+                             "python" + distutils.sysconfig.get_config_var("EXE")),
+                             post_interp))
                     outf.writelines(f.readlines())
                     outf.close()
                 if f:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.