[devscripts] 01/01: wrap-and-sort: PEP8 fixes.

Benjamin Drung bdrung at moszumanska.debian.org
Mon May 12 20:08:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

bdrung pushed a commit to branch master
in repository devscripts.

commit 7ef930bb87a49ab728f1e03600780c22db7fedad
Author: Benjamin Drung <bdrung at debian.org>
Date:   Mon May 12 22:07:58 2014 +0200

    wrap-and-sort: PEP8 fixes.
---
 scripts/wrap-and-sort | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/wrap-and-sort b/scripts/wrap-and-sort
index ef04847..58edd1b 100755
--- a/scripts/wrap-and-sort
+++ b/scripts/wrap-and-sort
@@ -48,6 +48,7 @@ SUPPORTED_FILES = (
     "*.install",
 )
 
+
 class WrapAndSortControl(Control):
     def wrap_and_sort(self, wrap_always, short_indent, sort_paragraphs,
                       keep_first, trailing_comma):
@@ -135,11 +136,13 @@ def remove_trailing_whitespaces(filename):
     f.write(new_content)
     f.close()
 
+
 def sort_list(unsorted_list):
     packages = [x for x in unsorted_list if re.match("[a-z0-9]", x)]
     special = [x for x in unsorted_list if not re.match("[a-z0-9]", x)]
     return sorted(packages) + sorted(special)
 
+
 def wrap_and_sort(options):
     control_files = [f for f in options.files if re.search("/control[^/]*$", f)]
     for control_file in control_files:
@@ -168,6 +171,7 @@ def wrap_and_sort(options):
         install.sort()
         install.save()
 
+
 def get_files(debian_directory):
     """Returns a list of files that should be wrapped and sorted."""
     files = []
@@ -177,6 +181,7 @@ def get_files(debian_directory):
                      if not os.access(file_name, os.X_OK))
     return files
 
+
 def main():
     script_name = os.path.basename(sys.argv[0])
     usage = "%s [options]" % (script_name)
@@ -218,11 +223,11 @@ def main():
     (options, args) = parser.parse_args()
 
     if len(args) != 0:
-        parser.error("Unsupported additional parameters specified: %s" % \
+        parser.error("Unsupported additional parameters specified: %s" %
                      ", ".join(args))
 
     if not os.path.isdir(options.debian_directory):
-        parser.error('Debian directory not found, expecting "%s".' % \
+        parser.error('Debian directory not found, expecting "%s".' %
                      options.debian_directory)
 
     not_found = [f for f in options.files if not os.path.isfile(f)]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list