Make pylint happier and code more PEP-8 compliant.

This commit is contained in:
Benjamin Drung 2011-08-20 11:31:02 +02:00
parent 3e3b9bcff5
commit ce2f96bc0d
5 changed files with 8 additions and 11 deletions

View File

@ -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.')

View File

@ -16,7 +16,6 @@
# PERFORMANCE OF THIS SOFTWARE.
import os
import os.path
import pwd
import re
import shlex

View File

@ -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

View File

@ -25,7 +25,6 @@
# Modules.
import locale
import os
import os.path
import sys
import distro_info

View File

@ -16,7 +16,6 @@
import __builtin__
import os
import os.path
import sys
from StringIO import StringIO