← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:doctest-trailing-whitespace into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:doctest-trailing-whitespace into launchpad:master.

Commit message:
Remove trailing whitespace from doctests

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

Or, in some cases (especially things like "-- " email signature separators), add noqa comments to tell lp-lint-doctest to ignore this.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:doctest-trailing-whitespace into launchpad:master.
diff --git a/doc/webapp-process.txt b/doc/webapp-process.txt
index d7222d5..01414cb 100644
--- a/doc/webapp-process.txt
+++ b/doc/webapp-process.txt
@@ -42,7 +42,7 @@ Web application architecture
 
 For the purposes of this document, a web application is put together as
 follows::
- 
+
  +--------------------------------------------------------------------------+
  |              {  Amorphous cloud of URLs  }                               |
  |  URLS      {   /rosetta/foo/bar/baz.html   }                             |
diff --git a/lib/lp/answers/stories/question-add-in-other-languages.txt b/lib/lp/answers/stories/question-add-in-other-languages.txt
index 47498e5..bdd93eb 100644
--- a/lib/lp/answers/stories/question-add-in-other-languages.txt
+++ b/lib/lp/answers/stories/question-add-in-other-languages.txt
@@ -42,7 +42,7 @@ At this point we'll present any similar questions (in any language)
 understood by any member of the support community.
 
     >>> similar_questions = find_tag_by_id(browser.contents, 'similar-questions')
-    
+
     XXX: Making search fast has a significant impact on this tests' use case,
     because there are 9 terms - the query has to ignore 7 of the terms to
     permit a hit under the new & based logic (which is needed for scaling).
diff --git a/lib/lp/app/stories/basics/xx-lowercase-redirection.txt b/lib/lp/app/stories/basics/xx-lowercase-redirection.txt
index b477fe3..ae59e84 100644
--- a/lib/lp/app/stories/basics/xx-lowercase-redirection.txt
+++ b/lib/lp/app/stories/basics/xx-lowercase-redirection.txt
@@ -25,7 +25,7 @@ The redirection also works for other Launchpad subdomains:
     >>> anon_browser.open('http://answers.launchpad.test/~nAmE12')
     >>> print(anon_browser.url)
     http://answers.launchpad.test/~name12
-    
+
 When doing a POST to an invalid URL, we get an error:
 
     >>> print(http(r"""
diff --git a/lib/lp/archiveuploader/tests/nascentupload-announcements.txt b/lib/lp/archiveuploader/tests/nascentupload-announcements.txt
index 7f9ed4a..9f7c2f9 100644
--- a/lib/lp/archiveuploader/tests/nascentupload-announcements.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload-announcements.txt
@@ -180,7 +180,7 @@ This is the body of the rejection email.
     None
     >>> print(body.get('Content-Type'))
     text/plain; charset="utf-8"
-    >>> print(body.get_payload(decode=True).decode('UTF-8'))
+    >>> print(body.get_payload(decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     Rejected:
     The source bar - 1.0-1 is already accepted in ubuntu/hoary and you cannot upload the same version within the same distribution. You have to modify the source version and re-upload.
@@ -212,7 +212,7 @@ changes file is enclosed as an attachment.
     attachment; filename="changesfile"
     >>> print(attachment.get('Content-Type'))
     text/plain; charset="utf-8"
-    >>> print(attachment.get_payload(decode=True).decode('UTF-8'))
+    >>> print(attachment.get_payload(decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     Format: 1.7
     Date: Thu, 16 Feb 2006 15:34:09 +0000
@@ -394,7 +394,7 @@ UNAPPROVED source uploads for 'translations' section via insecure:
     'UNAPPROVED'
 
 UNAPPROVED message was also skipped for an upload targeted to
-'translation' section: 
+'translation' section:
     >>> transaction.commit()
     >>> len(stub.test_emails)
     0
@@ -667,7 +667,7 @@ changes file is mentioned toward the end of the email.
     None
     >>> print(body.get('Content-Type'))
     text/plain; charset="utf-8"
-    >>> print(body.get_payload(decode=True).decode('UTF-8'))
+    >>> print(body.get_payload(decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     bar (1.0-10) breezy; urgency=low
     <BLANKLINE>
@@ -714,7 +714,7 @@ And what follows is the content of the attachment.
     attachment; filename="changesfile"
     >>> print(attachment.get('Content-Type'))
     text/plain; charset="utf-8"
-    >>> print(attachment.get_payload(decode=True).decode('UTF-8'))
+    >>> print(attachment.get_payload(decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     Format: 1.7
     Date: Thu, 30 Mar 2006 01:36:14 +0100
diff --git a/lib/lp/blueprints/stories/sprints/sprint-settopics.txt b/lib/lp/blueprints/stories/sprints/sprint-settopics.txt
index fa46ab1..d0185b9 100644
--- a/lib/lp/blueprints/stories/sprints/sprint-settopics.txt
+++ b/lib/lp/blueprints/stories/sprints/sprint-settopics.txt
@@ -61,7 +61,7 @@ else.  First choose a driver for the UDS Guacamole sprint.
     >>> print(extract_text(meeting_drivers.find_next('a')))
     Ubuntu Team
 
-Any member of the Ubuntu-Team can now approve and/or decline items to the UDS 
+Any member of the Ubuntu-Team can now approve and/or decline items to the UDS
 Guacamole agenda.
 
     >>> cprov_browser = setupBrowser(
diff --git a/lib/lp/blueprints/stories/standalone/xx-batching.txt b/lib/lp/blueprints/stories/standalone/xx-batching.txt
index cec3c6b..828d18c 100644
--- a/lib/lp/blueprints/stories/standalone/xx-batching.txt
+++ b/lib/lp/blueprints/stories/standalone/xx-batching.txt
@@ -2,11 +2,11 @@ Blueprint Batching
 ==================
 
 For projects with large numbers of blueprints, it's important that users are
-able to navigate easily through those blueprints. It's also important for us 
-to render lists of blueprints in a way that is scalable, making efficient use 
+able to navigate easily through those blueprints. It's also important for us
+to render lists of blueprints in a way that is scalable, making efficient use
 of Launchpad resources.
 
-To support these aims, we render long lists of blueprints in batches. We allow 
+To support these aims, we render long lists of blueprints in batches. We allow
 the user to navigate between the batches on demand.
 
 To demonstrate this, we'll create a new project:
@@ -56,11 +56,11 @@ We'll go ahead and add just a single blueprint:
     >>> browser.url
     'http://blueprints.launchpad.test/big-project/+spec/blueprint-0'
 
-When we ask for the complete list of blueprints for our project, the new 
+When we ask for the complete list of blueprints for our project, the new
 blueprint is listed:
 
     >>> browser.open("http://blueprints.launchpad.test/big-project";)
-    >>> print(extract_text(first_tag_by_class(browser.contents, 
+    >>> print(extract_text(first_tag_by_class(browser.contents,
     ...                                      'batch-navigation-index')))
     1...→...1...of...1 result
 
@@ -77,20 +77,20 @@ Observe that now when we ask for the complete list of blueprints, only some of
 the blueprints are listed:
 
     >>> browser.open("http://blueprints.launchpad.test/big-project";)
-    >>> print(extract_text(first_tag_by_class(browser.contents, 
+    >>> print(extract_text(first_tag_by_class(browser.contents,
     ...                                      'batch-navigation-index')))
     1...→...5...of...20 results
 
 We can go to the next batch of blueprints by following the 'Next' link:
 
     >>> browser.getLink('Next').click()
-    >>> print(extract_text(first_tag_by_class(browser.contents, 
+    >>> print(extract_text(first_tag_by_class(browser.contents,
     ...                                      'batch-navigation-index')))
     6...→...10...of...20 results
 
 Following the 'Last' link takes us to the last batch of blueprints:
 
     >>> browser.getLink('Last').click()
-    >>> print(extract_text(first_tag_by_class(browser.contents, 
+    >>> print(extract_text(first_tag_by_class(browser.contents,
     ...                                      'batch-navigation-index')))
     16...→...20...of...20 results
diff --git a/lib/lp/bugs/browser/tests/buglinktarget-views.txt b/lib/lp/bugs/browser/tests/buglinktarget-views.txt
index ed48965..cdd78f2 100644
--- a/lib/lp/bugs/browser/tests/buglinktarget-views.txt
+++ b/lib/lp/bugs/browser/tests/buglinktarget-views.txt
@@ -83,7 +83,7 @@ Unlink Bugs View
 
 
 The +unlinkbug view is used to unlink a selection of bugs from an
-IBugLinkTarget. 
+IBugLinkTarget.
 
     >>> view = create_view(cve, name='+unlinkbug')
     >>> print(view.label)
diff --git a/lib/lp/bugs/doc/bug.txt b/lib/lp/bugs/doc/bug.txt
index 4e5f41b..41d48d0 100644
--- a/lib/lp/bugs/doc/bug.txt
+++ b/lib/lp/bugs/doc/bug.txt
@@ -59,7 +59,7 @@ result set below has only one element.
     2
 
     >>> for bug in result_set:
-    ...     print('%d: %s' % (bug.id, bug.title[:40]))
+    ...     print('%d: %s' % (bug.id, bug.title[:40]))  # noqa
     1: Firefox does not support SVG
     6: Firefox crashes when Save As dialog for 
 
diff --git a/lib/lp/bugs/doc/bugmessage.txt b/lib/lp/bugs/doc/bugmessage.txt
index 34c4e7f..88ffd51 100644
--- a/lib/lp/bugs/doc/bugmessage.txt
+++ b/lib/lp/bugs/doc/bugmessage.txt
@@ -101,8 +101,8 @@ scores.
     >>> test_message = bug_one.newMessage(
     ...     owner=bug_watch_updater,
     ...     subject="test message subject",
-    ...     content="""This is a test comment. This bug is the same as the 
-    ...                one described here 
+    ...     content="""This is a test comment. This bug is the same as the
+    ...                one described here
     ...                http://some.bugzilla/show_bug.cgi?id=9876
     ...                See also CVE-1991-9911
     ...             """)
diff --git a/lib/lp/bugs/doc/bugnotification-email.txt b/lib/lp/bugs/doc/bugnotification-email.txt
index 557c38f..268d2a9 100644
--- a/lib/lp/bugs/doc/bugnotification-email.txt
+++ b/lib/lp/bugs/doc/bugnotification-email.txt
@@ -199,7 +199,7 @@ is wrapped properly:
     ...         'new': edited_bug.description,
     ...         'old': old_description,
     ...     })
-    >>> for change in get_bug_changes(bug_delta):
+    >>> for change in get_bug_changes(bug_delta):  # noqa
     ...     notification = change.getBugNotification()
     ...     print(notification['text']) #doctest: -NORMALIZE_WHITESPACE
     ...     print("-----------------------------")
diff --git a/lib/lp/bugs/doc/cve.txt b/lib/lp/bugs/doc/cve.txt
index 6801d8f..3322f40 100644
--- a/lib/lp/bugs/doc/cve.txt
+++ b/lib/lp/bugs/doc/cve.txt
@@ -123,7 +123,8 @@ linkCVE are bypassed.
     >>> private_bug.unlinkCVE(cve, user=private_bug.owner)
     >>> login("test@xxxxxxxxxxxxx")
 
-== 2014 CVE identification format changes =  
+2014 CVE identification format changes
+--------------------------------------
 
 Since 2014, CVEs can have an identifier (sequence) longer than 4-digits.
 
@@ -136,7 +137,7 @@ CVEs creation accepts 2014 format:
     CVE-2014-999999
 
 Text references to CVEs using 2014 format can be found:
- 
+
     >>> b.findCvesInText('''
     ...     This bug is related to CVE-2014-999999
     ... ''', user=no_priv)
diff --git a/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt b/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt
index 86d0359..a18be02 100644
--- a/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt
+++ b/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt
@@ -310,7 +310,7 @@ remote server. This allows us to include salient information, such as
 the comment author, with the pushed comment.
 
     >>> formatted_message = bugwatch_updater._formatRemoteComment(message)
-    >>> print(formatted_message)
+    >>> print(formatted_message)  # noqa
     Sample Person added the following comment to Launchpad bug report...:
     <BLANKLINE>
     Pushing, for the purpose of.
diff --git a/lib/lp/bugs/stories/bugs/xx-add-comment-with-bugwatch-and-cve.txt b/lib/lp/bugs/stories/bugs/xx-add-comment-with-bugwatch-and-cve.txt
index d08c361..4ac5ddd 100644
--- a/lib/lp/bugs/stories/bugs/xx-add-comment-with-bugwatch-and-cve.txt
+++ b/lib/lp/bugs/stories/bugs/xx-add-comment-with-bugwatch-and-cve.txt
@@ -45,7 +45,7 @@ url of a remote bug.
     >>> user_browser.url
     'http://bugs.launchpad.test/debian/+source/mozilla-firefox/+bug/1'
 
-    >>> bugwatch_portlet = find_portlet(user_browser.contents, 
+    >>> bugwatch_portlet = find_portlet(user_browser.contents,
     ...    'Remote bug watches')
     >>> added_bugwatch_link = bugwatch_portlet('a')[-2]
     >>> print(extract_text(added_bugwatch_link))
diff --git a/lib/lp/bugs/stories/bugs/xx-bug-text-pages.txt b/lib/lp/bugs/stories/bugs/xx-bug-text-pages.txt
index 5469d18..1e321f9 100644
--- a/lib/lp/bugs/stories/bugs/xx-bug-text-pages.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bug-text-pages.txt
@@ -58,7 +58,7 @@ For example, users can view a textual description of bug 1:
     >>> anon_browser.url
     'http://launchpad.test/bugs/1/+text'
     >>> print(anon_browser.headers['content-type'])
-    text/plain;charset=utf-8 
+    text/plain;charset=utf-8
 
 The textual description contains basic information about that bug, along with
 all tasks related to that bug, presented in an easy-to-digest format:
@@ -70,16 +70,16 @@ all tasks related to that bug, presented in an easy-to-digest format:
     date-reported: Thu, 01 Jan 2004 20:58:04 -0000
     date-updated: ...
     reporter: Sample Person (name12)
-    duplicate-of: 
-    duplicates: 
+    duplicate-of:
+    duplicates:
     attachments:
        http://bugs.launchpad.test/.../+files/file_a.txt text/html
        http://bugs.launchpad.test/.../+files/file%20with%20space.txt
          text/plain; name="file with space.txt"
     patches:
         http://.../bug-patch.diff text/plain
-    tags: 
-    subscribers: 
+    tags:
+    subscribers:
         Steve Alexander (stevea)
         Sample Person (name12)
     <BLANKLINE>
@@ -98,7 +98,7 @@ all tasks related to that bug, presented in an easy-to-digest format:
     reporter: Sample Person (name12)
     importance: Low
     assignee: Márk Shúttlewòrth (mark)
-    milestone: 
+    milestone:
     <BLANKLINE>
     task: mozilla-firefox (Ubuntu)
     status: New
@@ -107,8 +107,8 @@ all tasks related to that bug, presented in an easy-to-digest format:
     reporter: Foo Bar (name16)
     importance: Medium
     component: main
-    assignee: 
-    milestone: 
+    assignee:
+    milestone:
     <BLANKLINE>
     task: mozilla-firefox (Debian)
     status: Confirmed
@@ -117,8 +117,8 @@ all tasks related to that bug, presented in an easy-to-digest format:
     reporter: Sample Person (name12)
     watch: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=304014
     importance: Low
-    assignee: 
-    milestone: 
+    assignee:
+    milestone:
     <BLANKLINE>
     Content-Type: multipart/mixed; boundary="...
 
@@ -247,7 +247,7 @@ duplicated bug's ID:
     >>> anon_browser.url
     'http://launchpad.test/bugs/6/+text'
     >>> print(anon_browser.headers['content-type'])
-    text/plain;charset=utf-8 
+    text/plain;charset=utf-8
 
     >>> print(anon_browser.contents)
     bug: 6
@@ -262,12 +262,12 @@ duplicate bug IDs:
     >>> anon_browser.url
     'http://launchpad.test/bugs/5/+text'
     >>> print(anon_browser.headers['content-type'])
-    text/plain;charset=utf-8 
+    text/plain;charset=utf-8
 
     >>> print(anon_browser.contents)
     bug: 5
     ...
-    duplicate-of: 
+    duplicate-of:
     duplicates: 6
     ...
 
@@ -286,7 +286,7 @@ For example, users can see the IDs of open bugs on Mozilla Firefox:
     >>> anon_browser.url
     'http://launchpad.test/firefox/+bugs-text'
     >>> print(anon_browser.headers['content-type'])
-    text/plain;charset=utf-8 
+    text/plain;charset=utf-8
 
     >>> print(anon_browser.contents)
     5
diff --git a/lib/lp/bugs/stories/bugs/xx-bugs.txt b/lib/lp/bugs/stories/bugs/xx-bugs.txt
index e07dec7..168d0ca 100644
--- a/lib/lp/bugs/stories/bugs/xx-bugs.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bugs.txt
@@ -3,7 +3,7 @@ specifically Hoary.
 
     >>> browser.open('http://localhost/ubuntu/hoary/+bugs')
     >>> print(browser.title)
-    Hoary (5.04) : Bugs : Ubuntu 
+    Hoary (5.04) : Bugs : Ubuntu
 
 This page checks that we can see a list of bugs on the distributions, in
 this case Ubuntu.
diff --git a/lib/lp/bugs/stories/bugtask-searches/xx-unexpected-form-data.txt b/lib/lp/bugs/stories/bugtask-searches/xx-unexpected-form-data.txt
index ab04d56..aefde8b 100644
--- a/lib/lp/bugs/stories/bugtask-searches/xx-unexpected-form-data.txt
+++ b/lib/lp/bugs/stories/bugtask-searches/xx-unexpected-form-data.txt
@@ -15,7 +15,7 @@ is raised.
     Traceback (most recent call last):
       ...
     lp.app.errors.UnexpectedFormData: Unknown sort column 'foobar'
-    
+
     >>> browser.open(
     ...     "http://launchpad.test/firefox/+bugs?";
     ...     "field.status_upstream=hide_open")
diff --git a/lib/lp/code/doc/codeimport.txt b/lib/lp/code/doc/codeimport.txt
index 9f2c088..c12d96b 100644
--- a/lib/lp/code/doc/codeimport.txt
+++ b/lib/lp/code/doc/codeimport.txt
@@ -258,7 +258,7 @@ created if done through the web UI, so we'll add nopriv here.
     ...     {'review_status': CodeImportReviewStatus.REVIEWED,
     ...      'url': 'http://svn.example.com/project/trunk'},
     ...     nopriv)
-    >>> print_emails(group_similar=True, decode=True)
+    >>> print_emails(group_similar=True, decode=True)  # noqa
     From: Code Import Person <import@xxxxxxxxxxx>
     To: david.allouche@xxxxxxxxxxxxx, ...
     Subject: Code import ~person-name-.../product.../name... status: Reviewed
diff --git a/lib/lp/code/stories/codeimport/xx-create-codeimport.txt b/lib/lp/code/stories/codeimport/xx-create-codeimport.txt
index 474844c..93de21b 100644
--- a/lib/lp/code/stories/codeimport/xx-create-codeimport.txt
+++ b/lib/lp/code/stories/codeimport/xx-create-codeimport.txt
@@ -17,7 +17,7 @@ the code home page "Import your project".
     Request a code import...
 
     >>> browser.contents
-    '...You will not be able to push directly to the 
+    '...You will not be able to push directly to the
     imported\n        branch or repository...'
 
 There is a cancel link on this page near the buttons to take the
diff --git a/lib/lp/registry/browser/tests/pillar-views.txt b/lib/lp/registry/browser/tests/pillar-views.txt
index 93b80d9..b46926a 100644
--- a/lib/lp/registry/browser/tests/pillar-views.txt
+++ b/lib/lp/registry/browser/tests/pillar-views.txt
@@ -91,7 +91,7 @@ to configure each service.
     configure_bugtracker
     configure_translations
     configure_answers
-    
+
 The registration status is determined with the 'configuration_states'
 property.  Notice that blueprints are not included in the
 configuration links nor the completeness computation as the use of
@@ -144,7 +144,7 @@ indicator showing whether it has been configured or not.
     <a ...href="http://launchpad.test/bread/+configure-code";...
     <span class="sprite no action-icon">...
     <a ...href="http://launchpad.test/bread/+configure-bugtracker";...
-    <span class="sprite no action-icon">...    
+    <span class="sprite no action-icon">...
     <a ...href="http://launchpad.test/bread/+configure-translations";...
     <span class="sprite yes action-icon">...
     <a ...href="http://launchpad.test/bread/+configure-answers";...
diff --git a/lib/lp/registry/doc/cache-country-mirrors.txt b/lib/lp/registry/doc/cache-country-mirrors.txt
index b7ca4d3..ea3c8fb 100644
--- a/lib/lp/registry/doc/cache-country-mirrors.txt
+++ b/lib/lp/registry/doc/cache-country-mirrors.txt
@@ -7,7 +7,7 @@ originated.  This functionality is provided so that apt can pick the
 mirror which is geographically closer to the box where it's running.
 One problem with that, though, is that there are way too many Ubuntu
 users and most of them will update their systems when security updates
-are available, causing apt to DDoS Launchpad.  To avoid that we'll 
+are available, causing apt to DDoS Launchpad.  To avoid that we'll
 periodically generate static versions of these lists and serve them
 through apache.
 
diff --git a/lib/lp/registry/doc/distribution-sourcepackage.txt b/lib/lp/registry/doc/distribution-sourcepackage.txt
index ea6437f..a93253b 100644
--- a/lib/lp/registry/doc/distribution-sourcepackage.txt
+++ b/lib/lp/registry/doc/distribution-sourcepackage.txt
@@ -87,12 +87,12 @@ backports excluded.
     >>> warty = ubuntu['warty']
     >>> hoary = ubuntu['hoary']
 
-This demonstrates the scenario where a newer distroseries becomes obsolete 
+This demonstrates the scenario where a newer distroseries becomes obsolete
 before an older distroseries. The latest_overall_publication property will
 return the publication from the older distroseries because a published
 publication is considered more relevant than an obsolete publication.
 
-Note that the component of the package in the newer obsolete distroseries 
+Note that the component of the package in the newer obsolete distroseries
 is 'main' and in the older distroseries it is 'universe'.
 
     >>> compiz_publication_warty = publisher.getPubSource(
@@ -105,7 +105,7 @@ is 'main' and in the older distroseries it is 'universe'.
     >>> print(compiz.latest_overall_publication.component.name)
     universe
 
-When more than one published publication exists in a single distroseries, 
+When more than one published publication exists in a single distroseries,
 latest_overall_publication will favor updates over security and security over
 release.
 
diff --git a/lib/lp/registry/doc/karmacontext.txt b/lib/lp/registry/doc/karmacontext.txt
index 6ce0646..9824db8 100644
--- a/lib/lp/registry/doc/karmacontext.txt
+++ b/lib/lp/registry/doc/karmacontext.txt
@@ -52,7 +52,7 @@ product/project group/distribution grouped by categories.
     >>> sorted_categories = sorted(contributors.keys(),
     ...                            key=operator.attrgetter('title'))
     >>> for category in sorted_categories:
-    ...     people = [(person.name, karmavalue) 
+    ...     people = [(person.name, karmavalue)
     ...               for person, karmavalue in contributors[category]]
     ...     print("%s: %s" % (category.title, pretty(people)))
     Bug Management: [('name16', 26), ('name12', 13)]
diff --git a/lib/lp/registry/doc/poll.txt b/lib/lp/registry/doc/poll.txt
index 5e36c2b..bbd77c2 100644
--- a/lib/lp/registry/doc/poll.txt
+++ b/lib/lp/registry/doc/poll.txt
@@ -30,7 +30,7 @@ reasons why we teams can have polls attached to them.
     >>> now = datetime.now(pytz.timezone('UTC'))
     >>> onesec = timedelta(seconds=1)
 
-We need to login with one of the administrators of the team named 
+We need to login with one of the administrators of the team named
 'ubuntu-team' to be able to create/edit polls.
     >>> login('colin.watson@xxxxxxxxxxxxxxx')
 
diff --git a/lib/lp/registry/doc/teammembership-email-notification.txt b/lib/lp/registry/doc/teammembership-email-notification.txt
index 022f36c..218334c 100644
--- a/lib/lp/registry/doc/teammembership-email-notification.txt
+++ b/lib/lp/registry/doc/teammembership-email-notification.txt
@@ -81,7 +81,7 @@ generates a notification email only to Ubuntu Team administrators.
     >>> len(stub.test_emails)
     5
 
-    >>> print_distinct_emails(include_reply_to=True, decode=True)
+    >>> print_distinct_emails(include_reply_to=True, decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -131,7 +131,7 @@ job now.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -189,7 +189,7 @@ The same goes for approving a proposed member.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -239,7 +239,7 @@ The same for deactivating a membership.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -285,7 +285,7 @@ message sent.
     >>> len(stub.test_emails)
     5
 
-    >>> print_distinct_emails(include_reply_to=True, decode=True)
+    >>> print_distinct_emails(include_reply_to=True, decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -337,7 +337,7 @@ Now, the emails have been sent.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Marilize Coetzee <marilize@xxxxxxx>
     X-Launchpad-Message-Rationale: Member (ubuntu-team)
@@ -396,7 +396,7 @@ membership will only be activated if they accept the invitation.
     >>> len(stub.test_emails)
     1
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Mark Shuttleworth <mark@xxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Admin (ubuntu-mirror-admins)
@@ -434,7 +434,7 @@ team.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -498,7 +498,7 @@ Similarly, a notification is sent if the invitation is declined.
     >>> len(stub.test_emails)
     7
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -553,7 +553,7 @@ passing force_team_add=True to the addMember() method.
     >>> len(stub.test_emails)
     5
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Foo Bar <foo.bar@xxxxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Member (ubuntu-team) @launchpad
@@ -621,7 +621,7 @@ ubuntu-team's admins.
     >>> flush_database_updates()
     >>> beta_testers_on_ubuntu_team.sendExpirationWarningEmail()
     >>> run_mail_jobs()
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Launchpad Beta Testers Owner <beta-admin@xxxxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Member (ubuntu-team)
@@ -667,7 +667,7 @@ to renew their own membership.
     >>> flush_database_updates()
     >>> kamion_on_ubuntu_team.sendExpirationWarningEmail()
     >>> run_mail_jobs()
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Colin Watson <colin.watson@xxxxxxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Member (ubuntu-team)
@@ -695,7 +695,7 @@ to renew their own membership.
 
     >>> beta_testers_on_ubuntu_team.sendExpirationWarningEmail()
     >>> run_mail_jobs()
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Launchpad Beta Testers Owner <beta-admin@xxxxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Member (ubuntu-team)
@@ -740,7 +740,7 @@ their membership page, where they can extend it.
     >>> flush_database_updates()
     >>> sampleperson_on_landscape.sendExpirationWarningEmail()
     >>> run_mail_jobs()
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Landscape Developers <noreply@xxxxxxxxxxxxx>
     To: Sample Person <test@xxxxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Member (landscape-developers)
@@ -800,7 +800,7 @@ notification is sent to all team admins.
     >>> len(stub.test_emails)
     1
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Mirror Administrators <noreply@xxxxxxxxxxxxx>
     To: Mark Shuttleworth <mark@xxxxxxxxxxx>
     X-Launchpad-Message-Rationale: Admin (ubuntu-mirror-admins)
@@ -852,7 +852,7 @@ email notification.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Colin Watson <colin.watson@xxxxxxxxxxxxxxx>,
@@ -899,7 +899,7 @@ will only be sent to the team administrators.
     >>> len(stub.test_emails)
     5
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Celso Providelo <celso.providelo@xxxxxxxxxxxxx>,
@@ -934,7 +934,7 @@ wouldn't make sense to the members of the team reading it.
     >>> len(stub.test_emails)
     6
 
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Ubuntu Team <noreply@xxxxxxxxxxxxx>
     To: Alexander Limi <limi@xxxxxxxxx>,
         Celso Providelo <celso.providelo@xxxxxxxxxxxxx>,
@@ -1031,7 +1031,7 @@ notification email contain subscription information.
     ...     name='team-member', email='team-member@xxxxxxxxxxx')
     >>> ignored = team_one.addMember(member, owner)
     >>> run_mail_jobs()
-    >>> print_distinct_emails(decode=True)
+    >>> print_distinct_emails(decode=True)  # noqa
     From: Team One ...
     To: Team-member <team-member...>
     X-Launchpad-Message-Rationale: Member (team-one)
@@ -1058,7 +1058,7 @@ emails contain subscription information.
     ...     name='team-two', email='team-two@xxxxxxxxxxx', owner=owner)
     >>> ignored = team_one.addMember(team_two, owner, force_team_add=True)
     >>> run_mail_jobs()
-    >>> print_distinct_emails(include_for=True, decode=True)
+    >>> print_distinct_emails(include_for=True, decode=True)  # noqa
     From: Team One ...
     To: Team Two <team-two...>
     X-Launchpad-Message-Rationale: Member (team-one) @team-two
diff --git a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
index b28373f..275a6bf 100644
--- a/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
+++ b/lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt
@@ -655,7 +655,7 @@ Test if the advertisement email was sent:
 
     >>> admin_console_link.click()
 
-  We are in the Administration page 
+  We are in the Administration page
 
     >>> browser.url
     'http://localhost:9000/codeofconduct/console'
diff --git a/lib/lp/registry/stories/team-polls/xx-poll-confirm-vote.txt b/lib/lp/registry/stories/team-polls/xx-poll-confirm-vote.txt
index 28a5ac1..ef6bb53 100644
--- a/lib/lp/registry/stories/team-polls/xx-poll-confirm-vote.txt
+++ b/lib/lp/registry/stories/team-polls/xx-poll-confirm-vote.txt
@@ -28,32 +28,32 @@
     ... Authorization: Basic %s
     ... Referer: https://launchpad.test/
     ... Content-Type: application/x-www-form-urlencoded
-    ... 
+    ...
     ... token=9WjxQq2V9p&showvote=Show+My+Vote""" % jdub_auth))
     HTTP/1.1 200 Ok
     ...
                   <p>Your vote was as follows:</p>
                   <p>
     <BLANKLINE>
-                      <b>1</b>. 
+                      <b>1</b>.
                       D
     <BLANKLINE>
                   </p>
                   <p>
     <BLANKLINE>
-                      <b>2</b>. 
+                      <b>2</b>.
                       B
     <BLANKLINE>
                   </p>
                   <p>
     <BLANKLINE>
-                      <b>3</b>. 
+                      <b>3</b>.
                       A
     <BLANKLINE>
                   </p>
                   <p>
     <BLANKLINE>
-                      <b>3</b>. 
+                      <b>3</b>.
                       C
     <BLANKLINE>
                   </p>
@@ -84,7 +84,7 @@
     ... Authorization: Basic %s
     ... Referer: https://launchpad.test/
     ... Content-Type: application/x-www-form-urlencoded
-    ... 
+    ...
     ... token=W7gR5mjNrX&showvote=Show+My+Vote""" % jdub_auth))
     HTTP/1.1 200 Ok
     ...
diff --git a/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt b/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt
index 92c447c..c8d49f7 100644
--- a/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt
+++ b/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt
@@ -123,7 +123,7 @@ One must have special permissions to access certain attributes:
     whiteboard: ...redacted...
 
 Mirror registrars may see some:
-    
+
     >>> response = test_webservice.get(
     ...     archive_404_mirror['self_link']).jsonBody()
     >>> pprint_entry(response)
diff --git a/lib/lp/services/database/doc/multitablecopy.txt b/lib/lp/services/database/doc/multitablecopy.txt
index c03c47d..074c942 100644
--- a/lib/lp/services/database/doc/multitablecopy.txt
+++ b/lib/lp/services/database/doc/multitablecopy.txt
@@ -495,7 +495,7 @@ through an SQL condition.
     ...     'textual', where_clause="length(t) = 3", inert_where="t <> 'one'")
 
 Inert rows can be useful in a table (here "textual") if you want to copy rows
-in a later table (here "numeric") that contains a foreign key referring to 
+in a later table (here "numeric") that contains a foreign key referring to
 the first.  You can use inert rows in this situation so that regular,
 non-inert in "numeric" will be attached to newly copied rows in "textual" as
 usual, but others are copied while remaining attached to their original
diff --git a/lib/lp/services/gpg/doc/gpg-encryption.txt b/lib/lp/services/gpg/doc/gpg-encryption.txt
index 952738a..b1a1b0c 100644
--- a/lib/lp/services/gpg/doc/gpg-encryption.txt
+++ b/lib/lp/services/gpg/doc/gpg-encryption.txt
@@ -51,7 +51,7 @@ Note fingerprint is also unicode.
 
     >>> key = gpghandler.retrieveKey(fingerprint)
     >>> cipher = gpghandler.encryptContent(content.encode('utf-8'), key)
-    
+
 cipher constains the encrypted content.
 
 Storing the raw password may compromise the security, but is the
@@ -60,8 +60,8 @@ only way we can decrypt the cipher content.
     >>> password = six.ensure_str('test')
     >>> plain = decrypt_content(cipher, password)
 
-voilá, the same content shows up again. 
-    
+voilá, the same content shows up again.
+
     >>> print(backslashreplace(plain.decode('utf-8')))
     \ufcber
 
diff --git a/lib/lp/services/messages/doc/message.txt b/lib/lp/services/messages/doc/message.txt
index 146684b..75a22e2 100644
--- a/lib/lp/services/messages/doc/message.txt
+++ b/lib/lp/services/messages/doc/message.txt
@@ -203,7 +203,7 @@ used as a default.
     ... Content-Type: multipart/mixed; charset="latin-1";
     ...               boundary="=====BOUNDARY====="
     ... MIME-Version: 1.0
-    ... Subject: 
+    ... Subject: something
     ... From: foo.bar@xxxxxxxxxxxxx
     ... Message-Id: <20080603@localhost.localdomain>
     ... Date: Thu Mar 06 13:00 MET 2008
diff --git a/lib/lp/services/webapp/doc/canonical_url.txt b/lib/lp/services/webapp/doc/canonical_url.txt
index 2c79232..16d9a94 100644
--- a/lib/lp/services/webapp/doc/canonical_url.txt
+++ b/lib/lp/services/webapp/doc/canonical_url.txt
@@ -71,7 +71,7 @@ Define a navigation for the Country URL.
     ...         town.name = 'Greenwich'
     ...         return town
     >>> provideAdapter(
-    ...     CountryNavigation, [ICountry, IDefaultBrowserLayer], 
+    ...     CountryNavigation, [ICountry, IDefaultBrowserLayer],
     ...     IBrowserPublisher)
 
 We don't have ICanonicalUrlData adapters for objects that provide any of these
@@ -495,7 +495,7 @@ Giving an unregistered view name will trigger an assertion failure.
     >>> canonical_url(country_instance, view_name="+does-not-exist")
     Traceback (most recent call last):
       ...
-    AssertionError: Name "+does-not-exist" is not registered as a view 
+    AssertionError: Name "+does-not-exist" is not registered as a view
     or navigation step for "Country" on "bugs".
 
 
diff --git a/lib/lp/soyuz/doc/build-failedtoupload-workflow.txt b/lib/lp/soyuz/doc/build-failedtoupload-workflow.txt
index 92d6aee..5099978 100644
--- a/lib/lp/soyuz/doc/build-failedtoupload-workflow.txt
+++ b/lib/lp/soyuz/doc/build-failedtoupload-workflow.txt
@@ -82,7 +82,7 @@ Note that the generated notification contain the 'extra_info' content:
 
     >>> notification_body = six.ensure_text(
     ...     build_notification.get_payload(decode=True))
-    >>> print(notification_body) #doctest: -NORMALIZE_WHITESPACE
+    >>> print(notification_body)  # noqa  # doctest: -NORMALIZE_WHITESPACE
     <BLANKLINE>
      * Source Package: cdrkit
      * Version: 1.0
diff --git a/lib/lp/soyuz/doc/distroseriesbinarypackage.txt b/lib/lp/soyuz/doc/distroseriesbinarypackage.txt
index 9204fff..ff0710f 100644
--- a/lib/lp/soyuz/doc/distroseriesbinarypackage.txt
+++ b/lib/lp/soyuz/doc/distroseriesbinarypackage.txt
@@ -75,7 +75,7 @@ whatever reason), then last_published returns None.
 
     >>> firefox_hoary_dsbp.current_publishings
     []
-    
+
     >>> print(firefox_hoary_dsbp.last_published)
     None
 
diff --git a/lib/lp/soyuz/doc/distroseriesqueue-notify.txt b/lib/lp/soyuz/doc/distroseriesqueue-notify.txt
index 1fb94fe..5b90c8b 100644
--- a/lib/lp/soyuz/doc/distroseriesqueue-notify.txt
+++ b/lib/lp/soyuz/doc/distroseriesqueue-notify.txt
@@ -85,7 +85,7 @@ uploader's email address.
 The mail body contains a list of files that were accepted:
 
     >>> print(notification.get_payload(0).get_payload(
-    ...     decode=True).decode('UTF-8'))
+    ...     decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     NEW: netapplet_1.0-1.dsc
     NEW: netapplet_1.0.orig.tar.gz
@@ -184,6 +184,7 @@ the uploader and the changer) and the changer.
 The mail body contains the same list of files again:
 
     >>> print(msgs[0].get_payload(0).get_payload(decode=True).decode('UTF-8'))
+    ... # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     netapplet (1.0-1) ...
     <BLANKLINE>
@@ -267,7 +268,7 @@ The mail headers are the same as before:
 The mail body contains the same list of files again:
 
     >>> print(changer_notification.get_payload(0).get_payload(
-    ...     decode=True).decode('UTF-8'))
+    ...     decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     NEW: netapplet_1.0-1.dsc
     NEW: netapplet_1.0.orig.tar.gz
@@ -282,7 +283,7 @@ The mail body contains the same list of files again:
     listed in this package's changelog.
     <BLANKLINE>
     >>> print(signer_notification.get_payload(0).get_payload(
-    ...     decode=True).decode('UTF-8'))
+    ...     decode=True).decode('UTF-8'))  # noqa
     ... # doctest: -NORMALIZE_WHITESPACE
     NEW: netapplet_1.0-1.dsc
     NEW: netapplet_1.0.orig.tar.gz
diff --git a/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt b/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt
index 61f08cc..5dcf121 100644
--- a/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt
+++ b/lib/lp/soyuz/doc/soyuz-set-of-uploads.txt
@@ -334,7 +334,7 @@ Check the email recipient for displayname containing special chars,
 '.', must be rfc2047 compliant:
 
     >>> simulate_upload('bar_1.0-4')
-    >>> read_email()
+    >>> read_email()  # noqa
     To: "Foo B. Bar" <foo.bar@xxxxxxxxxxxxx>
     Subject: [ubuntutest/breezy] bar 1.0-4 (Accepted)
     Content-Type: text/plain; charset="utf-8"
diff --git a/lib/lp/soyuz/stories/soyuz/xx-distribution-add.txt b/lib/lp/soyuz/stories/soyuz/xx-distribution-add.txt
index 7805e1f..d635589 100644
--- a/lib/lp/soyuz/stories/soyuz/xx-distribution-add.txt
+++ b/lib/lp/soyuz/stories/soyuz/xx-distribution-add.txt
@@ -1,7 +1,7 @@
 Creating new distributions
 ==========================
 
-A non launchpad admin doesn't see the link to create a new distribution on 
+A non launchpad admin doesn't see the link to create a new distribution on
 the distributions page:
 
     >>> user_browser.open("http://launchpad.test/distros";)
diff --git a/lib/lp/translations/browser/tests/translationmessage-views.txt b/lib/lp/translations/browser/tests/translationmessage-views.txt
index fbffebc..1c62063 100644
--- a/lib/lp/translations/browser/tests/translationmessage-views.txt
+++ b/lib/lp/translations/browser/tests/translationmessage-views.txt
@@ -460,7 +460,7 @@ languages...
     plural_index: 0
     pofile: ...
     potmsgset: ...
-    row_html_id: 
+    row_html_id:
     suggestion_dismissable_class: msgset_15_dismissable_button
     suggestion_html_id: msgset_15_ja_suggestion_..._0
     suggestion_text: Foo <code>%d</code>
diff --git a/lib/lp/translations/doc/poexport-queue.txt b/lib/lp/translations/doc/poexport-queue.txt
index 562eb08..f22f5c6 100644
--- a/lib/lp/translations/doc/poexport-queue.txt
+++ b/lib/lp/translations/doc/poexport-queue.txt
@@ -74,7 +74,7 @@ As usual, when there is an error, two emails should be sent:
 
 One is for the user with the error notification.
 
-    >>> print_emails(notifications=[carlos_email], decode=True)
+    >>> print_emails(notifications=[carlos_email], decode=True)  # noqa
     From: ...
     To: carlos@xxxxxxxxxxxxx
     Subject: Launchpad translation download: Evolution trunk -
@@ -97,7 +97,7 @@ One is for the user with the error notification.
 And the other to the admins.  This one lists the files that were being
 exported as context to help tracking down any bugs.
 
-    >>> print_emails(notifications=[admin_email], decode=True)
+    >>> print_emails(notifications=[admin_email], decode=True)  # noqa
     From: ...
     To: launchpad-error-reports@xxxxxxxxxxxxxxxxxxx
     Subject: Launchpad translation download errors: Evolution trunk -
@@ -161,7 +161,7 @@ inject a mock exception in that case so that the test can pass.
 The user's notification looks no different from that for an ordinary
 error.
 
-    >>> print_emails(notifications=[carlos_email], decode=True)
+    >>> print_emails(notifications=[carlos_email], decode=True)  # noqa
     From: ...
     To: carlos@xxxxxxxxxxxxx
     Subject: Launchpad translation download: Evolution trunk -
@@ -184,7 +184,7 @@ error.
 The one for the administrators, however, does not include the
 unprintable exception text.
 
-    >>> print_emails(notifications=[admin_email], decode=True)
+    >>> print_emails(notifications=[admin_email], decode=True)  # noqa
     From: ...
     To: launchpad-error-reports@xxxxxxxxxxxxxxxxxxx
     Subject: Launchpad translation download errors: Evolution trunk -
@@ -230,7 +230,7 @@ In this case, there are no errors, so we should get just a single email
     >>> len(test_emails)
     1
 
-    >>> print_emails(notifications=test_emails, decode=True)
+    >>> print_emails(notifications=test_emails, decode=True)  # noqa
     From: ...
     To: carlos@xxxxxxxxxxxxx
     Subject: Launchpad translation download: Evolution trunk -
@@ -299,7 +299,7 @@ And a confirmation email was sent to carlos, the importer.
 
 The confirmation email shows no errors at all.
 
-    >>> print_emails(notifications=test_emails, decode=True)
+    >>> print_emails(notifications=test_emails, decode=True)  # noqa
     From: ...
     To: carlos@xxxxxxxxxxxxx
     Subject: Launchpad translation download: Evolution trunk -
diff --git a/lib/lp/translations/doc/poexport-request-productseries.txt b/lib/lp/translations/doc/poexport-request-productseries.txt
index ba45bac..a762411 100644
--- a/lib/lp/translations/doc/poexport-request-productseries.txt
+++ b/lib/lp/translations/doc/poexport-request-productseries.txt
@@ -51,7 +51,7 @@ The user receives a confirmation email.
     >>> test_emails = pop_notifications()
     >>> len(test_emails)
     1
-    >>> print_emails(notifications=test_emails, decode=True)
+    >>> print_emails(notifications=test_emails, decode=True)  # noqa
     From: ...
     Subject: Launchpad translation download: Evolution trunk
     Hello ...,
diff --git a/lib/lp/translations/doc/poexport-request.txt b/lib/lp/translations/doc/poexport-request.txt
index d9b36ab..4841cb9 100644
--- a/lib/lp/translations/doc/poexport-request.txt
+++ b/lib/lp/translations/doc/poexport-request.txt
@@ -54,7 +54,7 @@ The user receives a confirmation email.
     >>> emails = pop_notifications()
     >>> len(emails)
     1
-    >>> print_emails(notifications=emails, decode=True)
+    >>> print_emails(notifications=emails, decode=True)  # noqa
     From: ...
     To: downloader@xxxxxxxxxxx
     Subject: Launchpad translation download: Ubuntu Hoary pmount -
@@ -187,7 +187,7 @@ Let's try requesting an export in MO format:
     >>> emails = pop_notifications()
     >>> len(emails)
     1
-    >>> print_emails(notifications=emails, decode=True)
+    >>> print_emails(notifications=emails, decode=True)  # noqa
     From: ...
     To: downloader@xxxxxxxxxxx
     Subject: Launchpad translation download: Ubuntu Hoary pmount - Czech
diff --git a/lib/lp/translations/doc/translationbranchapprover.txt b/lib/lp/translations/doc/translationbranchapprover.txt
index ea71284..fc94773 100644
--- a/lib/lp/translations/doc/translationbranchapprover.txt
+++ b/lib/lp/translations/doc/translationbranchapprover.txt
@@ -116,7 +116,7 @@ object.
 
 Next the owner of the branch realizes that they need to put their translation
 template files in proper subdirectories for multiple templates to work
-correctly. Also, they start using a tool that calls the template 
+correctly. Also, they start using a tool that calls the template
 "messages.pot" consistently. So they move and rename the files. The branch
 upload job detects two changed files and places them in the upload queue.
 
diff --git a/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt b/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt
index 946c8a6..042a14c 100644
--- a/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt
+++ b/lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt
@@ -257,7 +257,7 @@ Thus only 98 entries remain in the Needs Review filter.
 Status filter validation
 ------------------------
 
-An attempt to filter for an undefined status is an UnexpectedFormData. 
+An attempt to filter for an undefined status is an UnexpectedFormData.
 
     >>> browser.open(
     ...     'http://translations.launchpad.test/+imports?'
@@ -339,7 +339,7 @@ Ubuntu.
     ...     """Show import queue entries that browser currently sees."""
     ...     output = []
     ...     import_list = find_tag_by_id(
-    ...         browser.contents, 'import-entries-list') 
+    ...         browser.contents, 'import-entries-list')
     ...     for entry in import_list.find_all('tr'):
     ...         output.append(represent_queue_entry(entry))
     ...     return '\n'.join(output)
diff --git a/lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt b/lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt
index 66b70be..1d4ee93 100644
--- a/lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt
+++ b/lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt
@@ -58,7 +58,7 @@ File format
 
 The request must specify a file format.
 
-    >>> user_browser.getControl('Format:').clear() 
+    >>> user_browser.getControl('Format:').clear()
     >>> user_browser.getControl('Request Download').click()
 
     >>> print_feedback_messages(user_browser.contents)
diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt
index cb37a04..2be81c0 100644
--- a/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt
+++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt
@@ -1,4 +1,4 @@
-In order to correctly display multilingual text and handle input, 
+In order to correctly display multilingual text and handle input,
 the browser needs to know the language and text direction for sections
 of the document. This information is used for a number of things including:
 
diff --git a/lib/lp/translations/stories/standalone/xx-potemplate-export.txt b/lib/lp/translations/stories/standalone/xx-potemplate-export.txt
index 58f9bd7..584e023 100644
--- a/lib/lp/translations/stories/standalone/xx-potemplate-export.txt
+++ b/lib/lp/translations/stories/standalone/xx-potemplate-export.txt
@@ -25,7 +25,7 @@ Logged in as a regular user, the +export page is accessible.
 If we POST without the appropriate format included, we tell the user off:
 
     >>> browser.getControl('Everything').selected = True
-    >>> browser.getControl('Format:').clear() 
+    >>> browser.getControl('Format:').clear()
     >>> browser.getControl('Request Download').click()
 
     >>> print_feedback_messages(browser.contents)
diff --git a/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt b/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
index 16c404f..f418e60 100644
--- a/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
+++ b/lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt
@@ -30,7 +30,7 @@ There are two templates for evolution in Ubuntu Hoary
 
 Each template lists it's language translation statuses that are
 comprised of the translated languages plus the languages of the user,
-(except for English which is not translatable). For the Template 
+(except for English which is not translatable). For the Template
 "evolution-2.2", there are 22 untranslated strings for each language.
 100% of the strings are untranslated. The Last and Edited By columns
 indicate that these languages have never been edited my anyone.
diff --git a/lib/lp/translations/utilities/doc/gettext_po_parser.txt b/lib/lp/translations/utilities/doc/gettext_po_parser.txt
index 4d0c047..7321806 100644
--- a/lib/lp/translations/utilities/doc/gettext_po_parser.txt
+++ b/lib/lp/translations/utilities/doc/gettext_po_parser.txt
@@ -201,7 +201,7 @@ We need an standard template header.
     ...     Content-Type: text/plain; charset=CHARSET
     ...     Content-Transfer-Encoding: 8bit
     ...     Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;
-    ...     """)
+    ...     """)  # noqa
 
 and a translation header with some fields set.
 
@@ -267,7 +267,7 @@ template.
     ...     Content-Transfer-Encoding: 8bit
     ...     Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;
     ...     Domain: blahdomain
-    ...     """)
+    ...     """)  # noqa
     >>> translation_header.updateFromTemplateHeader(template_header)
     >>> print(translation_header.getRawContent())
     Project-Id-Version: PACKAGE VERSION