From ce2f96bc0dc0dbd09dda86355208972fb7ce7705 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Sat, 20 Aug 2011 11:31:02 +0200 Subject: [PATCH] Make pylint happier and code more PEP-8 compliant. --- lp-shell | 8 ++++---- ubuntutools/config.py | 1 - ubuntutools/lp/lpapicache.py | 8 ++++---- ubuntutools/misc.py | 1 - ubuntutools/test/test_config.py | 1 - 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lp-shell b/lp-shell index 83c715c..22a1ef2 100755 --- a/lp-shell +++ b/lp-shell @@ -33,11 +33,11 @@ def main(): opt_parser.add_option('-a', action='store_true', dest='anonymous', default=False, help='Login anonymously into LP.') - opt_parser.add_option('--ipython',action='store_const', - dest='shell',const='ipython', default="ipython", + opt_parser.add_option('--ipython', action='store_const', + dest='shell', const='ipython', default="ipython", help='Use ipython shell (default).') - opt_parser.add_option('--python',action='store_const', - dest='shell',const='python', + opt_parser.add_option('--python', action='store_const', + dest='shell', const='python', help='Use python shell.') diff --git a/ubuntutools/config.py b/ubuntutools/config.py index 0680c0e..1743247 100644 --- a/ubuntutools/config.py +++ b/ubuntutools/config.py @@ -16,7 +16,6 @@ # PERFORMANCE OF THIS SOFTWARE. import os -import os.path import pwd import re import shlex diff --git a/ubuntutools/lp/lpapicache.py b/ubuntutools/lp/lpapicache.py index b7339ca..93601a3 100644 --- a/ubuntutools/lp/lpapicache.py +++ b/ubuntutools/lp/lpapicache.py @@ -201,7 +201,7 @@ class Distribution(BaseWrapper): cached = Distribution(Launchpad.distributions[dist]) return cached - def getArchive(self, archive = None): + def getArchive(self, archive=None): ''' Returns an Archive object for the requested archive. Raises a ArchiveNotFoundException if the archive doesn't exist. @@ -278,7 +278,7 @@ class Archive(BaseWrapper): if '_srcpkgs' not in self.__dict__: self._srcpkgs = dict() - def getSourcePackage(self, name, series = None, pocket = 'Release'): + def getSourcePackage(self, name, series=None, pocket='Release'): ''' Returns a SourcePackagePublishingHistory object for the most recent source package in the distribution 'dist', series and @@ -333,7 +333,7 @@ class Archive(BaseWrapper): return self._srcpkgs[(name, series.name, pocket)] def copyPackage(self, source_name, version, from_archive, to_pocket, - to_series = None, include_binaries = False): + to_series=None, include_binaries=False): '''Copy a single named source into this archive. Asynchronously copy a specific version of a named source to the @@ -446,7 +446,7 @@ class MetaPersonTeam(MetaWrapper): except HTTPError, error: if error.response.status == 401: # Anonymous login - cls._me = None + cls._me = None else: raise return cls._me diff --git a/ubuntutools/misc.py b/ubuntutools/misc.py index 94bc8af..ca8a82a 100644 --- a/ubuntutools/misc.py +++ b/ubuntutools/misc.py @@ -25,7 +25,6 @@ # Modules. import locale import os -import os.path import sys import distro_info diff --git a/ubuntutools/test/test_config.py b/ubuntutools/test/test_config.py index 2f4a2ed..cf78a3c 100644 --- a/ubuntutools/test/test_config.py +++ b/ubuntutools/test/test_config.py @@ -16,7 +16,6 @@ import __builtin__ import os -import os.path import sys from StringIO import StringIO