launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #14883
[Merge] lp:~stevenk/launchpad/prune-useless-imports into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/prune-useless-imports into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/prune-useless-imports/+merge/141583
After running pyflakes across the entire tree, and drowning in the output, I filtered it for useless imports, and after ignoring those that pulled in lp, or did special things, came up with this branch. pyflakes is now silent for the changed files in this branch.
--
https://code.launchpad.net/~stevenk/launchpad/prune-useless-imports/+merge/141583
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/prune-useless-imports into lp:launchpad.
=== modified file 'lib/lp/answers/browser/question.py'
--- lib/lp/answers/browser/question.py 2012-12-10 22:25:44 +0000
+++ lib/lp/answers/browser/question.py 2013-01-02 07:04:26 +0000
@@ -75,10 +75,7 @@
IAnswersFrontPageSearchForm,
IQuestionTarget,
)
-from lp.answers.vocabulary import (
- UsesAnswersDistributionVocabulary,
- UsesAnswersProductVocabulary,
- )
+from lp.answers.vocabulary import UsesAnswersDistributionVocabulary
from lp.app.browser.launchpadform import (
action,
custom_widget,
=== modified file 'lib/lp/answers/browser/tests/test_question.py'
--- lib/lp/answers/browser/tests/test_question.py 2012-12-26 01:04:05 +0000
+++ lib/lp/answers/browser/tests/test_question.py 2013-01-02 07:04:26 +0000
@@ -16,7 +16,6 @@
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
login_person,
- logout,
person_logged_in,
TestCaseWithFactory,
)
=== modified file 'lib/lp/answers/vocabulary.py'
--- lib/lp/answers/vocabulary.py 2012-12-26 01:04:05 +0000
+++ lib/lp/answers/vocabulary.py 2013-01-02 07:04:26 +0000
@@ -17,7 +17,6 @@
from lp.answers.interfaces.faq import IFAQ
from lp.answers.interfaces.faqtarget import IFAQTarget
-from lp.app.enums import ServiceUsage
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.model.product import Product
from lp.registry.vocabularies import (
=== modified file 'lib/lp/blueprints/interfaces/webservice.py'
--- lib/lp/blueprints/interfaces/webservice.py 2012-05-16 10:04:25 +0000
+++ lib/lp/blueprints/interfaces/webservice.py 2013-01-02 07:04:26 +0000
@@ -23,7 +23,6 @@
from lp.blueprints.interfaces.specificationsubscription import (
ISpecificationSubscription,
)
-from lp.blueprints.interfaces.specificationtarget import ISpecificationTarget
_schema_circular_imports
=== modified file 'lib/lp/bugs/browser/bugalsoaffects.py'
--- lib/lp/bugs/browser/bugalsoaffects.py 2012-12-11 00:32:46 +0000
+++ lib/lp/bugs/browser/bugalsoaffects.py 2013-01-02 07:04:26 +0000
@@ -9,7 +9,6 @@
'BugAlsoAffectsProductWithProductCreationView'
]
-import cgi
from textwrap import dedent
from lazr.enum import (
=== modified file 'lib/lp/bugs/browser/tests/test_bugs.py'
--- lib/lp/bugs/browser/tests/test_bugs.py 2012-11-15 22:22:38 +0000
+++ lib/lp/bugs/browser/tests/test_bugs.py 2013-01-02 07:04:26 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from zope.component import getUtility
-from zope.security.proxy import removeSecurityProxy
from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import BugTaskStatus
=== modified file 'lib/lp/bugs/browser/tests/test_bugtracker_views.py'
--- lib/lp/bugs/browser/tests/test_bugtracker_views.py 2012-09-14 20:44:13 +0000
+++ lib/lp/bugs/browser/tests/test_bugtracker_views.py 2013-01-02 07:04:26 +0000
@@ -16,7 +16,6 @@
)
from lp.testing.layers import DatabaseFunctionalLayer
from lp.testing.matchers import IsConfiguredBatchNavigator
-from lp.testing.sampledata import ADMIN_EMAIL
from lp.testing.views import create_initialized_view
@@ -62,8 +61,8 @@
self.assertThat(view.inactive_trackers, matcher)
def test_page_is_batched(self):
- active_tracker1 = self.factory.makeBugTracker()
- active_tracker2 = self.factory.makeBugTracker()
+ self.factory.makeBugTracker()
+ self.factory.makeBugTracker()
inactive_tracker1 = self.factory.makeBugTracker()
inactive_tracker2 = self.factory.makeBugTracker()
admin = getUtility(ILaunchpadCelebrities).admin.teamowner
=== modified file 'lib/lp/bugs/interfaces/webservice.py'
--- lib/lp/bugs/interfaces/webservice.py 2012-08-07 03:47:15 +0000
+++ lib/lp/bugs/interfaces/webservice.py 2013-01-02 07:04:26 +0000
@@ -56,7 +56,6 @@
NominationSeriesObsoleteError,
)
from lp.bugs.interfaces.bugsubscription import IBugSubscription
-from lp.bugs.interfaces.bugsubscriptionfilter import IBugSubscriptionFilter
from lp.bugs.interfaces.bugtarget import (
IBugTarget,
IHasBugs,
=== modified file 'lib/lp/buildmaster/interfaces/builder.py'
--- lib/lp/buildmaster/interfaces/builder.py 2012-05-23 10:28:40 +0000
+++ lib/lp/buildmaster/interfaces/builder.py 2013-01-02 07:04:26 +0000
@@ -1,8 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-# pylint: disable-msg=E0211,E0213
-
"""Builder interfaces."""
__metaclass__ = type
@@ -51,7 +49,6 @@
from lp.app.validators.url import builder_url_validator
from lp.registry.interfaces.role import IHasOwner
from lp.services.fields import (
- Description,
PersonChoice,
Title,
)
=== modified file 'lib/lp/registry/browser/tests/test_distroseries.py'
--- lib/lp/registry/browser/tests/test_distroseries.py 2012-12-10 13:43:47 +0000
+++ lib/lp/registry/browser/tests/test_distroseries.py 2013-01-02 07:04:26 +0000
@@ -100,7 +100,6 @@
normalize_whitespace,
person_logged_in,
StormStatementRecorder,
- TestCase,
TestCaseWithFactory,
with_celebrity_logged_in,
)
=== modified file 'lib/lp/services/tests/test_osutils.py'
--- lib/lp/services/tests/test_osutils.py 2012-12-26 02:03:56 +0000
+++ lib/lp/services/tests/test_osutils.py 2013-01-02 07:04:26 +0000
@@ -5,9 +5,7 @@
__metaclass__ = type
-import errno
import os
-import socket
import tempfile
from testtools.matchers import FileContains
=== modified file 'lib/lp/services/webapp/tests/test_webapp_authorization.py'
--- lib/lp/services/webapp/tests/test_webapp_authorization.py 2011-12-28 17:03:06 +0000
+++ lib/lp/services/webapp/tests/test_webapp_authorization.py 2013-01-02 07:04:26 +0000
@@ -21,8 +21,9 @@
from lp.testing.layers import ZopelessLayer
-class TestLaunchpadSecurityPolicy_getPrincipalsAccessLevel(
- CleanUp, TestCase):
+class TestLaunchpadSecurityPolicy_getPrincipalsAccessLevel(CleanUp, TestCase):
+
+ layer = ZopelessLayer
def setUp(self):
self.principal = LaunchpadPrincipal(
=== modified file 'lib/lp/soyuz/interfaces/packageset.py'
--- lib/lp/soyuz/interfaces/packageset.py 2012-10-01 06:43:41 +0000
+++ lib/lp/soyuz/interfaces/packageset.py 2013-01-02 07:04:26 +0000
@@ -1,8 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-# pylint: disable-msg=E0211,E0213
-
"""Packageset interfaces."""
__metaclass__ = type
@@ -23,7 +21,6 @@
export_as_webservice_entry,
export_destructor_operation,
export_factory_operation,
- export_operation_as,
export_read_operation,
export_write_operation,
exported,
=== modified file 'lib/lp/soyuz/model/distroseriesbinarypackage.py'
--- lib/lp/soyuz/model/distroseriesbinarypackage.py 2012-09-13 03:40:38 +0000
+++ lib/lp/soyuz/model/distroseriesbinarypackage.py 2013-01-02 07:04:26 +0000
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-# pylint: disable-msg=E0611,W0212
-
__metaclass__ = type
__all__ = [
'DistroSeriesBinaryPackage',
@@ -14,7 +12,6 @@
from storm.store import Store
from zope.interface import implements
-from lp.services.database.sqlbase import sqlvalues
from lp.services.propertycache import (
cachedproperty,
get_property_cache,
=== modified file 'lib/lp/soyuz/tests/test_buildpackagejob.py'
--- lib/lp/soyuz/tests/test_buildpackagejob.py 2012-10-02 04:39:27 +0000
+++ lib/lp/soyuz/tests/test_buildpackagejob.py 2013-01-02 07:04:26 +0000
@@ -3,12 +3,8 @@
"""Test BuildQueue features."""
-from datetime import (
- datetime,
- timedelta,
- )
+from datetime import timedelta
-import pytz
from simplejson import dumps
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
=== modified file 'lib/lp/translations/browser/tests/test_sharing_information.py'
--- lib/lp/translations/browser/tests/test_sharing_information.py 2012-08-06 06:13:50 +0000
+++ lib/lp/translations/browser/tests/test_sharing_information.py 2013-01-02 07:04:26 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from lp.app.enums import ServiceUsage
-from lp.services.features.testing import FeatureFixture
from lp.testing import (
BrowserTestCase,
celebrity_logged_in,
=== modified file 'lib/lp/translations/interfaces/webservice.py'
--- lib/lp/translations/interfaces/webservice.py 2011-12-22 16:19:11 +0000
+++ lib/lp/translations/interfaces/webservice.py 2013-01-02 07:04:26 +0000
@@ -1,8 +1,6 @@
# Copyright 2009, 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-# pylint: disable-msg=W0611
-
"""All the interfaces that are exposed through the webservice.
There is a declaration in ZCML somewhere that looks like:
@@ -28,10 +26,7 @@
)
from lp.translations.interfaces.pofile import IPOFile
from lp.translations.interfaces.potemplate import IPOTemplate
-from lp.translations.interfaces.translationgroup import (
- ITranslationGroup,
- ITranslationGroupSet,
- )
+from lp.translations.interfaces.translationgroup import ITranslationGroup
from lp.translations.interfaces.translationimportqueue import (
ITranslationImportQueue,
ITranslationImportQueueEntry,
=== modified file 'lib/lp/translations/tests/test_rosetta_branches_script.py'
--- lib/lp/translations/tests/test_rosetta_branches_script.py 2012-04-20 08:50:10 +0000
+++ lib/lp/translations/tests/test_rosetta_branches_script.py 2013-01-02 07:04:26 +0000
@@ -10,10 +10,7 @@
__metaclass__ = type
from bzrlib.revision import NULL_REVISION
-from testtools.matchers import (
- Equals,
- MatchesAny,
- )
+from testtools.matchers import Equals
import transaction
from zope.component import getUtility
=== modified file 'lib/lp/xmlrpc/tests/test_private_xmlrpc.py'
--- lib/lp/xmlrpc/tests/test_private_xmlrpc.py 2012-07-24 06:39:54 +0000
+++ lib/lp/xmlrpc/tests/test_private_xmlrpc.py 2013-01-02 07:04:26 +0000
@@ -11,7 +11,6 @@
from lp.services.verification.interfaces.logintoken import ILoginTokenSet
from lp.testing import (
anonymous_logged_in,
- person_logged_in,
TestCase,
)
from lp.testing.layers import LaunchpadFunctionalLayer