← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:doctest-more-imported-but-unused into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:doctest-more-imported-but-unused into launchpad:master.

Commit message:
Remove more unused imports from doctest

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406238

Found by lp-lint-doctest; somehow missed in my first round.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:doctest-more-imported-but-unused into launchpad:master.
diff --git a/lib/lp/bugs/stories/bugtask-management/xx-view-editable-bug-task.txt b/lib/lp/bugs/stories/bugtask-management/xx-view-editable-bug-task.txt
index 4d659b9..5159513 100644
--- a/lib/lp/bugs/stories/bugtask-management/xx-view-editable-bug-task.txt
+++ b/lib/lp/bugs/stories/bugtask-management/xx-view-editable-bug-task.txt
@@ -10,7 +10,6 @@ redirected to the login page.
 Even when the product has a bug supervisor, see bug #49891.
 
     >>> from zope.component import getUtility
-    >>> from lp.services.database.sqlbase import flush_database_updates
     >>> from lp.testing import login, logout
     >>> from lp.registry.interfaces.person import IPersonSet
     >>> from lp.registry.interfaces.product import IProductSet
diff --git a/lib/lp/bugs/stories/bugtracker/xx-bugtracker-handshake-tokens.txt b/lib/lp/bugs/stories/bugtracker/xx-bugtracker-handshake-tokens.txt
index d8f2e1a..7857961 100644
--- a/lib/lp/bugs/stories/bugtracker/xx-bugtracker-handshake-tokens.txt
+++ b/lib/lp/bugs/stories/bugtracker/xx-bugtracker-handshake-tokens.txt
@@ -11,8 +11,6 @@ done using the internal XML-RPC service.
     ...     'http://xmlrpc-private.launchpad.test:8087/bugs',
     ...     transport=XMLRPCTestTransport())
 
-    >>> from zope.component import getUtility
-    >>> from lp.bugs.xmlrpc.bug import ILoginTokenSet
     >>> token_string = bugtracker_api.newBugTrackerToken()
 
 Browsing to the token's +bugtracker-handshake URL will result in an
diff --git a/lib/lp/bugs/stories/feeds/xx-bug-atom.txt b/lib/lp/bugs/stories/feeds/xx-bug-atom.txt
index a71dfc5..86f2876 100644
--- a/lib/lp/bugs/stories/feeds/xx-bug-atom.txt
+++ b/lib/lp/bugs/stories/feeds/xx-bug-atom.txt
@@ -500,7 +500,6 @@ a feed.
 The bug search feed is not enabled by default since it may represent a
 performance problem in production.
 
-    >>> from zope.security.interfaces import Unauthorized
     >>> from lp.services.config import config
     >>> config.launchpad.is_bug_search_feed_active
     True
diff --git a/lib/lp/bugs/stories/feeds/xx-bug-html.txt b/lib/lp/bugs/stories/feeds/xx-bug-html.txt
index 782b8f2..ccf57cb 100644
--- a/lib/lp/bugs/stories/feeds/xx-bug-html.txt
+++ b/lib/lp/bugs/stories/feeds/xx-bug-html.txt
@@ -193,7 +193,6 @@ a feed.
 The bug search feed is not enabled by default since it may represent a
 performance problem in production.
 
-    >>> from zope.security.interfaces import Unauthorized
     >>> from lp.services.config import config
     >>> config.launchpad.is_bug_search_feed_active
     True
diff --git a/lib/lp/registry/doc/commercialsubscription.txt b/lib/lp/registry/doc/commercialsubscription.txt
index e235226..3a60b44 100644
--- a/lib/lp/registry/doc/commercialsubscription.txt
+++ b/lib/lp/registry/doc/commercialsubscription.txt
@@ -6,9 +6,6 @@ The CommercialSubscription class is used to track whether a project,
 which does not qualify for free hosting, has an unexpired subscription.
 
     >>> from zope.component import getUtility
-    >>> from lp.testing import verifyObject
-    >>> from lp.registry.interfaces.commercialsubscription import (
-    ...     ICommercialSubscription)
     >>> from lp.registry.interfaces.product import IProductSet
     >>> from lp.testing import login, ANONYMOUS
     >>> login('no-priv@xxxxxxxxxxxxx')
diff --git a/lib/lp/registry/doc/distribution-mirror.txt b/lib/lp/registry/doc/distribution-mirror.txt
index 8c54cfc..3a69e47 100644
--- a/lib/lp/registry/doc/distribution-mirror.txt
+++ b/lib/lp/registry/doc/distribution-mirror.txt
@@ -362,7 +362,6 @@ up on the public mirror listings.
     >>> import transaction
     >>> transaction.commit()
 
-    >>> from operator import itemgetter
     >>> from lp.services.compat import message_from_bytes
     >>> from lp.services.mail import stub
     >>> len(stub.test_emails)
diff --git a/lib/lp/services/feeds/doc/feeds.txt b/lib/lp/services/feeds/doc/feeds.txt
index 6e9e00c..2e313d2 100644
--- a/lib/lp/services/feeds/doc/feeds.txt
+++ b/lib/lp/services/feeds/doc/feeds.txt
@@ -16,9 +16,8 @@ In order to demonstrate a feed class, we need to create an interface
 for the thing comprising the feed.  Rather than use a standard
 Launchpad interface, we'll define one here.
 
-    >>> from zope.interface import Interface, Attribute, implements
     >>> from lp.services.feeds.tests.helper import (
-    ...     IThing, Thing, ThingFeedView)
+    ...     IThing, Thing)
 
 
 ZCML for browser:feeds
diff --git a/lib/lp/services/fields/doc/uri-field.txt b/lib/lp/services/fields/doc/uri-field.txt
index d56ae52..65b65f4 100644
--- a/lib/lp/services/fields/doc/uri-field.txt
+++ b/lib/lp/services/fields/doc/uri-field.txt
@@ -194,7 +194,6 @@ This widget is registered as an input widget:
 
   >>> from zope.formlib.interfaces import IInputWidget
   >>> from zope.component import getMultiAdapter
-  >>> from lp.app.widgets.textwidgets import URIWidget
   >>> from lp.services.webapp.servers import LaunchpadTestRequest
 
   >>> @implementer(IURIFieldTest)
diff --git a/lib/lp/services/mail/tests/incomingmail.txt b/lib/lp/services/mail/tests/incomingmail.txt
index 4c21007..3ade2b8 100644
--- a/lib/lp/services/mail/tests/incomingmail.txt
+++ b/lib/lp/services/mail/tests/incomingmail.txt
@@ -316,10 +316,7 @@ OOPS notifications work even if the From: address isn't properly MIME-encoded.
     ...
     TestOopsException
 
-    >>> from email.header import (
-    ...     decode_header,
-    ...     make_header,
-    ...     )
+    >>> from email.header import decode_header
     >>> from email.utils import parseaddr
     >>> notification = pop_notifications()[-1]
     >>> print(notification.get_content_type())