← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/bugs-lint into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/bugs-lint into lp:launchpad.

Commit message:
Remove lots of lint from lp.bugs.

Requested reviews:
  Colin Watson (cjwatson)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/bugs-lint/+merge/274576

Remove lots of lint from lp.bugs.
-- 
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/bugs/browser/bug.py'
--- lib/lp/bugs/browser/bug.py	2015-09-11 07:20:31 +0000
+++ lib/lp/bugs/browser/bug.py	2015-10-15 14:51:25 +0000
@@ -59,7 +59,6 @@
     Bool,
     Choice,
     )
-from zope.security.interfaces import Unauthorized
 from zope.security.proxy import removeSecurityProxy
 
 from lp import _

=== modified file 'lib/lp/bugs/browser/buglinktarget.py'
--- lib/lp/bugs/browser/buglinktarget.py	2015-09-29 05:29:46 +0000
+++ lib/lp/bugs/browser/buglinktarget.py	2015-10-15 14:51:25 +0000
@@ -12,7 +12,6 @@
     ]
 
 from collections import defaultdict
-from operator import attrgetter
 
 from lazr.lifecycle.event import ObjectModifiedEvent
 from lazr.lifecycle.snapshot import Snapshot

=== modified file 'lib/lp/bugs/browser/bugwatch.py'
--- lib/lp/bugs/browser/bugwatch.py	2013-10-16 05:53:43 +0000
+++ lib/lp/bugs/browser/bugwatch.py	2015-10-15 14:51:25 +0000
@@ -105,7 +105,7 @@
     @property
     def initial_values(self):
         """See `LaunchpadFormView.`"""
-        return {'url' : self.context.url}
+        return {'url': self.context.url}
 
     @property
     def watch_has_activity(self):

=== modified file 'lib/lp/bugs/browser/tests/test_buglisting.py'
--- lib/lp/bugs/browser/tests/test_buglisting.py	2015-01-09 02:02:15 +0000
+++ lib/lp/bugs/browser/tests/test_buglisting.py	2015-10-15 14:51:25 +0000
@@ -241,7 +241,8 @@
         """Search for a bug with 'term_format_string', test if we redirect."""
         bug = self.factory.makeBug()
         login_person(bug.owner)
-        default_bugtask_url = canonical_url(bug.default_bugtask, rootsite='bugs')
+        default_bugtask_url = canonical_url(
+            bug.default_bugtask, rootsite='bugs')
 
         browser = self.getUserBrowser("http://bugs.launchpad.dev/";)
         input_field = browser.getControl(name='field.searchtext')
@@ -263,7 +264,6 @@
         self.assertSearchTermRedirects("#{} other terms", False)
 
 
-
 class BugTargetTestCase(TestCaseWithFactory):
     """Test helpers for setting up `IBugTarget` tests."""
 

=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
--- lib/lp/bugs/browser/tests/test_bugtask.py	2015-10-13 16:58:20 +0000
+++ lib/lp/bugs/browser/tests/test_bugtask.py	2015-10-15 14:51:25 +0000
@@ -18,7 +18,6 @@
 import simplejson
 import soupmatchers
 from testtools.matchers import (
-    Equals,
     LessThan,
     Not,
     )

=== modified file 'lib/lp/bugs/browser/tests/test_bugtracker_views.py'
--- lib/lp/bugs/browser/tests/test_bugtracker_views.py	2013-05-02 16:20:22 +0000
+++ lib/lp/bugs/browser/tests/test_bugtracker_views.py	2015-10-15 14:51:25 +0000
@@ -26,7 +26,7 @@
     def test_related_projects(self):
         # Related products and projectgroups are shown by the view.
         tracker = self.factory.makeBugTracker()
-        project_group = self.factory.makeProject() 
+        project_group = self.factory.makeProject()
         product = self.factory.makeProduct()
         with admin_logged_in():
             project_group.bugtracker = tracker
@@ -45,7 +45,7 @@
             inactive_product.active = False
         view = create_initialized_view(tracker, name='+index')
         self.assertEqual([active_product], view.related_projects)
-            
+
     def test_bugtracker_with_private_project(self):
         tracker = self.factory.makeBugTracker()
         product = self.factory.makeProduct(
@@ -80,8 +80,9 @@
             "/+index?active_batch=1&inactive_batch=1")
         browser = self.getUserBrowser(url)
         content = browser.contents
-        # XXX RobertCollns 20100919 bug=642504. The support for multiple batches
-        # isn't complete and the id for the nav links gets duplicated.
+        # XXX RobertCollins 20100919 bug=642504. The support for multiple
+        # batches isn't complete and the id for the nav links gets
+        # duplicated.
         #self.assertEqual('next',
         #    find_tag_by_id(content, 'upper-batch-nav-batchnav-next')['class'])
         #self.assertEqual('next',

=== modified file 'lib/lp/bugs/externalbugtracker/roundup.py'
--- lib/lp/bugs/externalbugtracker/roundup.py	2011-01-23 09:34:35 +0000
+++ lib/lp/bugs/externalbugtracker/roundup.py	2015-10-15 14:51:25 +0000
@@ -54,14 +54,14 @@
     # are integer-only and highly configurable.  Therefore we map the
     # statuses available by default.
     _status_lookup_standard = LookupTree(
-        (1, BugTaskStatus.NEW),          # Roundup status 'unread'
-        (2, BugTaskStatus.CONFIRMED),    # Roundup status 'deferred'
-        (3, BugTaskStatus.INCOMPLETE),   # Roundup status 'chatting'
-        (4, BugTaskStatus.INCOMPLETE),   # Roundup status 'need-eg'
-        (5, BugTaskStatus.INPROGRESS),   # Roundup status 'in-progress'
-        (6, BugTaskStatus.INPROGRESS),   # Roundup status 'testing'
-        (7, BugTaskStatus.FIXCOMMITTED), # Roundup status 'done-cbb'
-        (8, BugTaskStatus.FIXRELEASED),  # Roundup status 'resolved'
+        (1, BugTaskStatus.NEW),           # Roundup status 'unread'
+        (2, BugTaskStatus.CONFIRMED),     # Roundup status 'deferred'
+        (3, BugTaskStatus.INCOMPLETE),    # Roundup status 'chatting'
+        (4, BugTaskStatus.INCOMPLETE),    # Roundup status 'need-eg'
+        (5, BugTaskStatus.INPROGRESS),    # Roundup status 'in-progress'
+        (6, BugTaskStatus.INPROGRESS),    # Roundup status 'testing'
+        (7, BugTaskStatus.FIXCOMMITTED),  # Roundup status 'done-cbb'
+        (8, BugTaskStatus.FIXRELEASED),   # Roundup status 'resolved'
         )
 
     # Python bugtracker statuses come in two parts: status and
@@ -70,31 +70,31 @@
         # Open issues (status=1). We also use this as a fallback for
         # statuses 2 and 3, for which the mappings are different only
         # in a few instances.
-        (None, BugTaskStatus.NEW),       # No resolution
-        (1, BugTaskStatus.CONFIRMED),    # Resolution: accepted
-        (2, BugTaskStatus.CONFIRMED),    # Resolution: duplicate
-        (3, BugTaskStatus.FIXCOMMITTED), # Resolution: fixed
-        (4, BugTaskStatus.INVALID),      # Resolution: invalid
-        (5, BugTaskStatus.CONFIRMED),    # Resolution: later
-        (6, BugTaskStatus.INVALID),      # Resolution: out-of-date
-        (7, BugTaskStatus.CONFIRMED),    # Resolution: postponed
-        (8, BugTaskStatus.WONTFIX),      # Resolution: rejected
-        (9, BugTaskStatus.CONFIRMED),    # Resolution: remind
-        (10, BugTaskStatus.WONTFIX),     # Resolution: wontfix
-        (11, BugTaskStatus.INVALID),     # Resolution: works for me
+        (None, BugTaskStatus.NEW),        # No resolution
+        (1, BugTaskStatus.CONFIRMED),     # Resolution: accepted
+        (2, BugTaskStatus.CONFIRMED),     # Resolution: duplicate
+        (3, BugTaskStatus.FIXCOMMITTED),  # Resolution: fixed
+        (4, BugTaskStatus.INVALID),       # Resolution: invalid
+        (5, BugTaskStatus.CONFIRMED),     # Resolution: later
+        (6, BugTaskStatus.INVALID),       # Resolution: out-of-date
+        (7, BugTaskStatus.CONFIRMED),     # Resolution: postponed
+        (8, BugTaskStatus.WONTFIX),       # Resolution: rejected
+        (9, BugTaskStatus.CONFIRMED),     # Resolution: remind
+        (10, BugTaskStatus.WONTFIX),      # Resolution: wontfix
+        (11, BugTaskStatus.INVALID),      # Resolution: works for me
         )
     _status_lookup_python = LookupTree(
         (1, _status_lookup_python_1),
         (2, LookupTree(
-            (None, BugTaskStatus.WONTFIX),   # No resolution
-            (1, BugTaskStatus.FIXCOMMITTED), # Resolution: accepted
-            (3, BugTaskStatus.FIXRELEASED),  # Resolution: fixed
-            (7, BugTaskStatus.WONTFIX),      # Resolution: postponed
-            _status_lookup_python_1)),       # Failback
+            (None, BugTaskStatus.WONTFIX),     # No resolution
+            (1, BugTaskStatus.FIXCOMMITTED),   # Resolution: accepted
+            (3, BugTaskStatus.FIXRELEASED),    # Resolution: fixed
+            (7, BugTaskStatus.WONTFIX),        # Resolution: postponed
+            _status_lookup_python_1)),         # Failback
         (3, LookupTree(
-            (None, BugTaskStatus.INCOMPLETE),# No resolution
-            (7, BugTaskStatus.WONTFIX),      # Resolution: postponed
-            _status_lookup_python_1)),       # Failback
+            (None, BugTaskStatus.INCOMPLETE),  # No resolution
+            (7, BugTaskStatus.WONTFIX),        # Resolution: postponed
+            _status_lookup_python_1)),         # Failback
         )
 
     # Status tree for roundup.mplayerhq.hu Roundup instances. This is
@@ -150,7 +150,7 @@
     _status_lookup = LookupTree(
         (PYTHON_BUGS_HOSTNAME, _status_lookup_python),
         (MPLAYERHQ_BUGS_HOSTNAME, _status_lookup_mplayerhq),
-        (_status_lookup_standard,), # Default
+        (_status_lookup_standard,),  # Default
         )
 
     def __init__(self, baseurl):

=== modified file 'lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py'
--- lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py	2015-07-08 16:05:11 +0000
+++ lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py	2015-10-15 14:51:25 +0000
@@ -161,8 +161,10 @@
         # When posting, a 404 is converted to a BugTrackerConnectError.
         base_url = "http://example.com/";
         bugtracker = ExternalBugTracker(base_url)
+
         def raise404(request, data, timeout=None):
             raise urllib2.HTTPError('url', 404, 'Not Found', None, None)
+
         with monkey_patch(urllib2, urlopen=raise404):
             self.assertRaises(
                 BugTrackerConnectError,
@@ -173,9 +175,11 @@
         base_host = 'example.com'
         base_url = 'http://%s/' % base_host
         bugtracker = ExternalBugTracker(base_url)
+
         def assert_headers(request, data, timeout=None):
             self.assertContentEqual(
                 [('User-agent', LP_USER_AGENT), ('Host', base_host)],
                 request.header_items())
+
         with monkey_patch(urllib2, urlopen=assert_headers):
             bugtracker._post('some-url', {'post-data': 'here'})

=== modified file 'lib/lp/bugs/interfaces/__init__.py'
--- lib/lp/bugs/interfaces/__init__.py	2010-11-08 14:55:18 +0000
+++ lib/lp/bugs/interfaces/__init__.py	2015-10-15 14:51:25 +0000
@@ -1,4 +1,2 @@
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-
-

=== modified file 'lib/lp/bugs/interfaces/bugtasksearch.py'
--- lib/lp/bugs/interfaces/bugtasksearch.py	2015-01-28 15:35:18 +0000
+++ lib/lp/bugs/interfaces/bugtasksearch.py	2015-10-15 14:51:25 +0000
@@ -554,7 +554,7 @@
         description=_('Show only bug tasks targeted to this milestone.'),
         value_type=ReferenceChoice(
         title=_('Milestone'), vocabulary='Milestone',
-            schema=Interface), #IMilestone
+            schema=Interface),  # IMilestone
         required=False)
     component = List(
         title=_('Component'),

=== modified file 'lib/lp/bugs/interfaces/bugwatch.py'
--- lib/lp/bugs/interfaces/bugwatch.py	2015-01-30 18:24:07 +0000
+++ lib/lp/bugs/interfaces/bugwatch.py	2015-10-15 14:51:25 +0000
@@ -266,7 +266,7 @@
 
     def getBugMessages(clauses):
         """Return all the `IBugMessage`s that reference this BugWatch.
-        
+
         :param clauses: A iterable of Storm clauses to limit the messages.
         """
 

=== modified file 'lib/lp/bugs/interfaces/cve.py'
--- lib/lp/bugs/interfaces/cve.py	2013-01-07 02:40:55 +0000
+++ lib/lp/bugs/interfaces/cve.py	2015-10-15 14:51:25 +0000
@@ -108,7 +108,7 @@
         CollectionField(
             title=_('Bugs related to this CVE entry.'),
             readonly=True,
-            value_type=Reference(schema=Interface))) # Redefined in bug.py.
+            value_type=Reference(schema=Interface)))  # Redefined in bug.py.
 
     # Other attributes.
     url = exported(

=== modified file 'lib/lp/bugs/interfaces/cvereference.py'
--- lib/lp/bugs/interfaces/cvereference.py	2013-01-07 02:40:55 +0000
+++ lib/lp/bugs/interfaces/cvereference.py	2015-10-15 14:51:25 +0000
@@ -27,6 +27,5 @@
     id = Int(title=_("Reference ID"), required=True, readonly=True)
     cve = Int(title=_('Bug ID'), required=True, readonly=True)
     source = TextLine(title=_("Source"), required=True, readonly=True)
-    content=Text(title=_("Content"), required=True)
+    content = Text(title=_("Content"), required=True)
     url = TextLine(title=_("URL"), required=False)
-

=== modified file 'lib/lp/bugs/interfaces/structuralsubscription.py'
--- lib/lp/bugs/interfaces/structuralsubscription.py	2015-07-21 09:04:01 +0000
+++ lib/lp/bugs/interfaces/structuralsubscription.py	2015-10-15 14:51:25 +0000
@@ -77,14 +77,14 @@
         required=False, readonly=True))
 
     target = exported(Reference(
-        schema=Interface, # IStructuralSubscriptionTarget
+        schema=Interface,  # IStructuralSubscriptionTarget
         required=True, readonly=True,
         title=_("The structure to which this subscription belongs.")))
 
     bug_filters = exported(CollectionField(
         title=_('List of bug filters that narrow this subscription.'),
         readonly=True, required=False,
-        value_type=Reference(schema=Interface))) # IBugSubscriptionFilter
+        value_type=Reference(schema=Interface)))  # IBugSubscriptionFilter
 
 
 class IStructuralSubscriptionRestricted(Interface):
@@ -198,7 +198,7 @@
                 ' subscribed.'),
             required=False))
     @call_with(subscribed_by=REQUEST_USER)
-    @export_factory_operation(Interface, []) # Really IBugSubscriptionFilter
+    @export_factory_operation(Interface, [])  # Really IBugSubscriptionFilter
     @operation_for_version('beta')
     def addBugSubscriptionFilter(subscriber, subscribed_by):
         """Add a bug subscription filter for this structure.

=== modified file 'lib/lp/bugs/mail/tests/__init__.py'
--- lib/lp/bugs/mail/tests/__init__.py	2010-05-25 14:14:34 +0000
+++ lib/lp/bugs/mail/tests/__init__.py	2015-10-15 14:51:25 +0000
@@ -1,5 +1,4 @@
 # Copyright 2010 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
-"""Tests for bugs related email processing goes here."""
-
+"""Tests for bugs related email processing go here."""

=== modified file 'lib/lp/bugs/mail/tests/test_bug_subscribe.py'
--- lib/lp/bugs/mail/tests/test_bug_subscribe.py	2014-06-09 22:32:44 +0000
+++ lib/lp/bugs/mail/tests/test_bug_subscribe.py	2015-10-15 14:51:25 +0000
@@ -37,7 +37,7 @@
         self.assertTrue(rationale in msg)
 
     def test_suppress_notify_true_does_not_notify(self):
-        """Test notifications are not sent when suppress_notify is True."""
+        """Test notifications aren't sent when suppress_notify is True."""
         bug = self.factory.makeBug()
         person_subscribing = self.factory.makePerson(
             name='foosuber', displayname='Foo Suber')
@@ -50,7 +50,7 @@
         self.assertEqual(len(stub.test_emails), 0)
 
     def test_suppress_notify_default_does_not_notify(self):
-        """Test notifications are not sent when suppress_notify is undefined."""
+        """Test notifications aren't sent when suppress_notify is undefined."""
         bug = self.factory.makeBug()
         person_subscribing = self.factory.makePerson(
             name='foosuber', displayname='Foo Suber')

=== modified file 'lib/lp/bugs/model/cvereference.py'
--- lib/lp/bugs/model/cvereference.py	2015-07-08 16:05:11 +0000
+++ lib/lp/bugs/model/cvereference.py	2015-10-15 14:51:25 +0000
@@ -25,5 +25,3 @@
     source = StringCol(notNull=True)
     content = StringCol(notNull=True)
     url = StringCol(notNull=False, default=None)
-
-

=== modified file 'lib/lp/bugs/model/personsubscriptioninfo.py'
--- lib/lp/bugs/model/personsubscriptioninfo.py	2015-07-08 16:05:11 +0000
+++ lib/lp/bugs/model/personsubscriptioninfo.py	2015-10-15 14:51:25 +0000
@@ -183,7 +183,7 @@
         # Preload bug owners, then all pillars.
         list(getUtility(IPersonSet).getPrecachedPersonsFromIDs(
             [bug.ownerID for bug in bugs]))
-        all_tasks = [task for task in bug.bugtasks for bug in bugs] 
+        all_tasks = [task for task in bug.bugtasks for bug in bugs]
         load_related(Product, all_tasks, ['productID'])
         load_related(Distribution, all_tasks, ['distributionID'])
         for bug in bugs:

=== modified file 'lib/lp/bugs/scripts/checkwatches/core.py'
--- lib/lp/bugs/scripts/checkwatches/core.py	2013-05-02 16:57:51 +0000
+++ lib/lp/bugs/scripts/checkwatches/core.py	2015-10-15 14:51:25 +0000
@@ -131,6 +131,7 @@
                 bug_watch_ids, get_bugwatcherrortype_for_error(e))
         raise
 
+
 class CheckwatchesMaster(WorkingBase):
     """Takes responsibility for updating remote bug watches."""
 
@@ -531,7 +532,7 @@
                 for index in xrange(0, len(remote_old_ids), batch_size):
                     remote_old_ids_to_check.extend(
                         remotesystem.getModifiedRemoteBugs(
-                            remote_old_ids[index : index + batch_size],
+                            remote_old_ids[index:index + batch_size],
                             oldest_lastchecked))
                     if len(remote_old_ids_to_check) >= batch_size:
                         break

=== modified file 'lib/lp/bugs/scripts/checkwatches/tests/test_base.py'
--- lib/lp/bugs/scripts/checkwatches/tests/test_base.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/scripts/checkwatches/tests/test_base.py	2015-10-15 14:51:25 +0000
@@ -27,8 +27,10 @@
 class StubTransactionManager:
     def __init__(self):
         self.log = []
+
     def abort(self):
         self.log.append('abort')
+
     def commit(self):
         self.log.append('commit')
 

=== modified file 'lib/lp/bugs/scripts/debbugs.py'
--- lib/lp/bugs/scripts/debbugs.py	2015-09-28 17:38:45 +0000
+++ lib/lp/bugs/scripts/debbugs.py	2015-10-15 14:51:25 +0000
@@ -42,10 +42,11 @@
         # Lazy loading of non-indexed attributes
 
         if not self.db.load(self, name):
-            raise AttributeError, name
+            raise AttributeError(name)
 
         if not hasattr(self, name):
-            raise InternalError, "Database.load did not provide attribute '%s'" % name
+            raise InternalError(
+                "Database.load did not provide attribute '%s'" % name)
 
         return getattr(self, name)
 
@@ -57,14 +58,38 @@
             self._emails.append(message)
         return self._emails
 
-class IndexParseError(Exception): pass
-class SummaryMissing(Exception): pass
-class SummaryParseError(Exception): pass
-class SummaryVersionError(Exception): pass
-class ReportMissing(Exception): pass
-class LogMissing(Exception): pass
-class LogParseFailed(Exception): pass
-class InternalError(Exception): pass
+
+class IndexParseError(Exception):
+    pass
+
+
+class SummaryMissing(Exception):
+    pass
+
+
+class SummaryParseError(Exception):
+    pass
+
+
+class SummaryVersionError(Exception):
+    pass
+
+
+class ReportMissing(Exception):
+    pass
+
+
+class LogMissing(Exception):
+    pass
+
+
+class LogParseFailed(Exception):
+    pass
+
+
+class InternalError(Exception):
+    pass
+
 
 class Database:
     def __init__(self, root, debbugs_pl, subdir='db-h'):
@@ -73,7 +98,9 @@
         self.subdir = subdir
 
     class bug_iterator:
-        index_record = re.compile(r'^(?P<package>\S+) (?P<bugid>\d+) (?P<date>\d+) (?P<status>\w+) \[(?P<originator>.*)\] (?P<severity>\w+)(?: (?P<tags>.*))?$')
+        index_record = re.compile(
+            r'^(?P<package>\S+) (?P<bugid>\d+) (?P<date>\d+) (?P<status>\w+) '
+            r'\[(?P<originator>.*)\] (?P<severity>\w+)(?: (?P<tags>.*))?$')
 
         def __init__(self, db, filter=None):
             self.db = db
@@ -126,20 +153,21 @@
             fd = open(summary)
         except IOError as e:
             if e.errno == 2:
-                raise SummaryMissing, summary
+                raise SummaryMissing(summary)
             raise
 
         try:
             message = email.message_from_file(fd)
         except Exception as e:
-            raise SummaryParseError, '%s: %s' % (summary, str(e))
+            raise SummaryParseError('%s: %s' % (summary, str(e)))
 
         version = message['format-version']
         if version is None:
-            raise SummaryParseError, "%s: Missing Format-Version" % summary
+            raise SummaryParseError("%s: Missing Format-Version" % summary)
 
         if version not in ('2', '3'):
-            raise SummaryVersionError, "%s: I don't understand version %s" % (summary, version)
+            raise SummaryVersionError(
+                "%s: I don't understand version %s" % (summary, version))
 
         bug.originator = message['submitter']
         bug.date = datetime.fromtimestamp(int(message['date']))
@@ -151,7 +179,7 @@
         bug.severity = message['severity']
 
         if 'merged-with' in message:
-            bug.mergedwith = map(int,message['merged-with'].split(' '))
+            bug.mergedwith = map(int, message['merged-with'].split(' '))
         else:
             bug.mergedwith = []
 
@@ -161,13 +189,14 @@
             bug.tags = []
 
     def load_report(self, bug):
-        report = os.path.join(self.root, 'db-h', self._hash(bug), '%d.report' % bug.id)
+        report = os.path.join(
+            self.root, 'db-h', self._hash(bug), '%d.report' % bug.id)
 
         try:
             fd = open(report)
         except IOError as e:
             if e.errno == 2:
-                raise ReportMissing, report
+                raise ReportMissing(report)
             raise
 
         bug.report = fd.read()
@@ -216,7 +245,7 @@
 
         except IOError as e:
             if e.errno == 2:
-                raise LogMissing, log
+                raise LogMissing(log)
             raise
 
         bug.comments = comments
@@ -243,5 +272,3 @@
             print bug, bug.subject
         except Exception as e:
             print >>sys.stderr, '%s: %s' % (e.__class__.__name__, str(e))
-
-

=== modified file 'lib/lp/bugs/subscribers/cve.py'
--- lib/lp/bugs/subscribers/cve.py	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/subscribers/cve.py	2015-10-15 14:51:25 +0000
@@ -8,4 +8,3 @@
 
 def cve_modified(cve, object_modified_event):
     cve.datemodified = UTC_NOW
-

=== modified file 'lib/lp/bugs/tests/test_bugtracker.py'
--- lib/lp/bugs/tests/test_bugtracker.py	2013-05-01 23:26:47 +0000
+++ lib/lp/bugs/tests/test_bugtracker.py	2015-10-15 14:51:25 +0000
@@ -429,6 +429,6 @@
     suite = unittest.TestLoader().loadTestsFromName(__name__)
     doctest_suite = DocTestSuite(
         'lp.bugs.model.bugtracker',
-        optionflags=NORMALIZE_WHITESPACE|ELLIPSIS)
+        optionflags=NORMALIZE_WHITESPACE | ELLIPSIS)
     suite.addTest(doctest_suite)
     return suite

=== modified file 'lib/lp/bugs/tests/test_bugwatch.py'
--- lib/lp/bugs/tests/test_bugwatch.py	2013-05-09 08:53:01 +0000
+++ lib/lp/bugs/tests/test_bugwatch.py	2015-10-15 14:51:25 +0000
@@ -124,7 +124,7 @@
                 "NoBugTrackerFound wasn't raised by extractBugTrackerAndBug")
 
     def test_invalid_bug_number(self):
-        # Replace the second digit of the remote bug id with an E, which all 
+        # Replace the second digit of the remote bug id with an E, which all
         # parsers will reject as invalid.
         invalid_url = re.sub(r'(\d)\d', r'\1E', self.bug_url, count=1)
         self.assertRaises(

=== modified file 'lib/lp/bugs/tests/test_structuralsubscription.py'
--- lib/lp/bugs/tests/test_structuralsubscription.py	2015-01-29 14:14:01 +0000
+++ lib/lp/bugs/tests/test_structuralsubscription.py	2015-10-15 14:51:25 +0000
@@ -938,7 +938,7 @@
             non_team_person.name,)
         self.assertRaisesWithContent(
             MuteNotAllowed, expected, self.filter.mute, non_team_person)
-        
+
     def test_mute_on_team_with_contact_address(self):
         # BugSubscriptionFilter.mute() will raise an error if called on
         # a subscription if the team has a contact address.

=== modified file 'lib/lp/bugs/utilities/filebugdataparser.py'
--- lib/lp/bugs/utilities/filebugdataparser.py	2010-02-19 17:48:51 +0000
+++ lib/lp/bugs/utilities/filebugdataparser.py	2015-10-15 14:51:25 +0000
@@ -50,8 +50,8 @@
                     return buffer
                 break
         end_index = self._buffer.index(end_string)
-        bytes = self._buffer[:end_index+len(end_string)]
-        self._buffer = self._buffer[end_index+len(end_string):]
+        bytes = self._buffer[:end_index + len(end_string)]
+        self._buffer = self._buffer[end_index + len(end_string):]
         return bytes
 
     def readHeaders(self):


References