← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/soyuz-pyflakes into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/soyuz-pyflakes into lp:launchpad.

Commit message:
Fix various pyflakes/lint errors in soyuz and friends.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/soyuz-pyflakes/+merge/222763

Fix various pyflakes/lint errors in soyuz and friends.  This includes fixing a test failure hidden by conflicting test class names.
-- 
https://code.launchpad.net/~cjwatson/launchpad/soyuz-pyflakes/+merge/222763
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/soyuz-pyflakes into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/publishing.py'
--- lib/lp/archivepublisher/publishing.py	2013-08-29 10:29:01 +0000
+++ lib/lp/archivepublisher/publishing.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2013 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __all__ = [
@@ -446,7 +446,6 @@
                 for arch in distroseries.architectures:
                     if not arch.enabled:
                         continue
-                    arch_path = "binary-%s" % arch.architecturetag
                     yield get_packages_path(
                         self._config, suite_name, component, arch)
                     for subcomp in self.subcomponents:

=== modified file 'lib/lp/archiveuploader/tests/test_dscfile.py'
--- lib/lp/archiveuploader/tests/test_dscfile.py	2013-06-26 07:53:23 +0000
+++ lib/lp/archiveuploader/tests/test_dscfile.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
+# Copyright 2010-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Test dscfile.py"""
@@ -303,7 +303,7 @@
     format = SourcePackageFormat.FORMAT_3_0_QUILT
 
     wrong_files_error = ('foo_1.dsc: must have only an orig.tar.*, a '
-                         'debian.tar.* and optionally orig-*.tar.*')
+                         'debian.tar.*, and optionally orig-*.tar.*')
     comp_conflict_error = 'foo_1.dsc: has more than one orig-bar.tar.*.'
 
     def testFormat30Quilt(self):
@@ -332,7 +332,7 @@
                 {ORIG_TARBALL: 1, DEBIAN_TARBALL: 1, filetype: 1})
 
 
-class Test30QuiltSourceFormatVerification(BaseTestSourceFileVerification):
+class Test30NativeSourceFormatVerification(BaseTestSourceFileVerification):
 
     format = SourcePackageFormat.FORMAT_3_0_NATIVE
 

=== modified file 'lib/lp/archiveuploader/tests/test_nascentupload.py'
--- lib/lp/archiveuploader/tests/test_nascentupload.py	2013-06-25 08:55:26 +0000
+++ lib/lp/archiveuploader/tests/test_nascentupload.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
+# Copyright 2010-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Test NascentUpload functionality."""
@@ -9,10 +9,7 @@
 from testtools.matchers import MatchesStructure
 
 from lp.archiveuploader.changesfile import determine_file_class_and_name
-from lp.archiveuploader.nascentupload import (
-    EarlyReturnUploadError,
-    NascentUpload,
-    )
+from lp.archiveuploader.nascentupload import NascentUpload
 from lp.archiveuploader.tests import (
     datadir,
     getPolicy,

=== modified file 'lib/lp/buildmaster/tests/test_buildqueue.py'
--- lib/lp/buildmaster/tests/test_buildqueue.py	2013-12-04 07:32:44 +0000
+++ lib/lp/buildmaster/tests/test_buildqueue.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2013 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 """Test BuildQueue features."""
 
@@ -13,7 +13,6 @@
     )
 from lp.buildmaster.model.buildqueue import BuildQueue
 from lp.services.database.interfaces import IStore
-from lp.services.features.testing import FeatureFixture
 from lp.soyuz.enums import (
     ArchivePurpose,
     PackagePublishingStatus,

=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py	2014-05-06 06:32:46 +0000
+++ lib/lp/soyuz/model/publishing.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2013 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -17,10 +17,7 @@
 
 from collections import defaultdict
 from datetime import datetime
-from operator import (
-    attrgetter,
-    itemgetter,
-    )
+from operator import attrgetter
 import os
 import re
 import sys
@@ -58,7 +55,6 @@
 from lp.services.database import bulk
 from lp.services.database.constants import UTC_NOW
 from lp.services.database.datetimecol import UtcDateTimeCol
-from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.enumcol import EnumCol
 from lp.services.database.interfaces import (
     IMasterStore,

=== modified file 'lib/lp/soyuz/scripts/gina/handlers.py'
--- lib/lp/soyuz/scripts/gina/handlers.py	2013-09-11 08:17:34 +0000
+++ lib/lp/soyuz/scripts/gina/handlers.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2012 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Gina db handlers.
@@ -72,7 +72,6 @@
     BinaryPackageFile,
     SourcePackageReleaseFile,
     )
-from lp.soyuz.model.processor import Processor
 from lp.soyuz.model.publishing import (
     BinaryPackagePublishingHistory,
     SourcePackagePublishingHistory,

=== modified file 'lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py'
--- lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py	2014-04-24 06:45:51 +0000
+++ lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py	2014-06-11 08:57:05 +0000
@@ -1,10 +1,9 @@
-# Copyright 2011 Canonical Ltd.  This software is licensed under the
+# Copyright 2011-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests of DistributionSourcePackageRelease."""
 
 from testtools.matchers import LessThan
-from zope.component import getUtility
 
 from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.distributionsourcepackagerelease import (

=== modified file 'lib/lp/soyuz/tests/test_vocabularies.py'
--- lib/lp/soyuz/tests/test_vocabularies.py	2012-06-28 01:14:33 +0000
+++ lib/lp/soyuz/tests/test_vocabularies.py	2014-06-11 08:57:05 +0000
@@ -1,4 +1,4 @@
-# Copyright 2012 Canonical Ltd.  This software is licensed under the
+# Copyright 2012-2014 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Test Soyuz vocabularies."""
@@ -6,7 +6,6 @@
 __metaclass__ = type
 
 from testtools.matchers import MatchesStructure
-from zope.schema.vocabulary import SimpleTerm
 
 from lp.soyuz.vocabularies import PPAVocabulary
 from lp.testing import TestCaseWithFactory


Follow ups