← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/launchpad/soyuz-lint-pre-cleanup into lp:launchpad

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/soyuz-lint-pre-cleanup into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/launchpad/soyuz-lint-pre-cleanup/+merge/72828

= Summary =

Cleaning up some of the lint I'm finding while working on something else.  Helps keep the diff for that other branch clean.


= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/soyuz/doc/publishing.txt
  lib/lp/soyuz/model/archive.py

./lib/lp/soyuz/doc/publishing.txt
     119: want exceeds 78 characters.
     367: want exceeds 78 characters.
     925: want exceeds 78 characters.
     927: want exceeds 78 characters.
     929: want exceeds 78 characters.
     952: want exceeds 78 characters.
./lib/lp/soyuz/model/archive.py
     354: redefinition of function 'private' from line 350
-- 
https://code.launchpad.net/~jtv/launchpad/soyuz-lint-pre-cleanup/+merge/72828
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/soyuz-lint-pre-cleanup into lp:launchpad.
=== modified file 'lib/lp/soyuz/doc/publishing.txt'
--- lib/lp/soyuz/doc/publishing.txt	2011-07-27 23:06:20 +0000
+++ lib/lp/soyuz/doc/publishing.txt	2011-08-25 05:56:24 +0000
@@ -30,12 +30,14 @@
     >>> from canonical.launchpad.webapp.testing import verifyObject
     >>> from lp.registry.interfaces.distroseries import IDistroSeries
     >>> from lp.registry.interfaces.sourcepackage import ISourcePackage
-    >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease
+    >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import (
+    ...     IDistributionSourcePackageRelease)
     >>> from lp.soyuz.interfaces.publishing import (
     ...     IBinaryPackagePublishingHistory,
     ...     ISourcePackagePublishingHistory,
     ...     )
-    >>> from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
+    >>> from lp.soyuz.interfaces.sourcepackagerelease import (
+    ...     ISourcePackageRelease)
 
     >>> verifyObject(ISourcePackagePublishingHistory, spph)
     True
@@ -769,7 +771,7 @@
     ...     ppa_copied_source.id)
 
 createMissingBuilds will not create any builds because this is an
-intra-archive copy: 
+intra-archive copy:
 
     >>> ppa_source.createMissingBuilds()
     []
@@ -901,7 +903,8 @@
 Symmetric behaviour is offered for BinaryPackagePublishing,
 BinaryPackageFile and IBinaryPackagePublishingHistory
 
-    >>> from lp.soyuz.interfaces.publishing import IBinaryPackageFilePublishing
+    >>> from lp.soyuz.interfaces.publishing import (
+    ...     IBinaryPackageFilePublishing)
 
     >>> bpph = BinaryPackagePublishingHistory.get(15)
     >>> print bpph.displayname
@@ -1491,8 +1494,8 @@
 fetch in a fixed number of queries (3) instead of varying according
 the size of the set (3 * N).
 
-     >>> from lp.soyuz.adapters.archivesourcepublication import (
-     ...     ArchiveSourcePublications)
+    >>> from lp.soyuz.adapters.archivesourcepublication import (
+    ...     ArchiveSourcePublications)
 
 We will use all published sources in Celso's PPA as our initial set.
 

=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py	2011-08-02 13:42:46 +0000
+++ lib/lp/soyuz/model/archive.py	2011-08-25 05:56:24 +0000
@@ -58,8 +58,8 @@
     DecoratedResultSet,
     )
 from canonical.launchpad.components.tokens import (
+    create_token,
     create_unique_token_for_table,
-    create_token,
     )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
@@ -150,8 +150,8 @@
     NoSuchPPA,
     NoTokensForTeams,
     PocketNotFound,
+    validate_external_dependencies,
     VersionRequiresName,
-    validate_external_dependencies,
     )
 from lp.soyuz.interfaces.archivearch import IArchiveArchSet
 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
@@ -1541,7 +1541,7 @@
         """Prevent copyPackage(s) if these conditions are not met."""
         if not getFeatureFlag(u"soyuz.copypackage.enabled"):
             raise ForbiddenByFeatureFlag
-        if (self.is_ppa and 
+        if (self.is_ppa and
             not getFeatureFlag(u"soyuz.copypackageppa.enabled")):
             # We have no way of giving feedback about failed jobs yet,
             # so this is disabled for now.
@@ -1959,7 +1959,8 @@
             commercial = getUtility(ILaunchpadCelebrities).commercial_admin
             admin = getUtility(ILaunchpadCelebrities).admin
             if not person.inTeam(commercial) and not person.inTeam(admin):
-                return '%s is not allowed to make private PPAs' % (person.name,)
+                return (
+                    '%s is not allowed to make private PPAs' % (person.name,))
         if person.isTeam() and (
             person.subscriptionpolicy in OPEN_TEAM_POLICY):
             return "Open teams cannot have PPAs."