Merge lp:~jtv/launchpad/fix-more-utilities into lp:launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 13775
Proposed branch: lp:~jtv/launchpad/fix-more-utilities
Merge into: lp:launchpad
Diff against target: 87 lines (+13/-13)
4 files modified
lib/lp/bugs/interfaces/bugtask.py (+1/-1)
lib/lp/code/interfaces/branchjob.py (+3/-2)
lib/lp/soyuz/interfaces/packagecloner.py (+8/-9)
lib/lp/soyuz/interfaces/packagediff.py (+1/-1)
To merge this branch: bzr merge lp:~jtv/launchpad/fix-more-utilities
Reviewer Review Type Date Requested Status
Steve Kowalik (community) code Approve
Review via email: mp+72666@code.launchpad.net

Commit message

[r=stevenk][no-qa] Fix some mistakes in utility interfaces.

Description of the change

= Summary =

I've got a sort-of-working prototype of a tool that verifies all our utilities to their utility interfaces.

This branch fixes some of the errors it finds. These are cases where the interface was clearly wrong, and there is no risk of affecting the web service API.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/code/interfaces/branchjob.py
  lib/lp/soyuz/interfaces/packagecloner.py
  lib/lp/soyuz/interfaces/packagediff.py
  lib/lp/bugs/interfaces/bugtask.py

To post a comment you must log in.
Revision history for this message
Steve Kowalik (stevenk) :
review: Approve (code)
Revision history for this message
Robert Collins (lifeless) wrote :

Just a FYI: per pep8 this hunk would be better as
@@ -17,12 +17,13 @@
 class IPackageCloner(Interface):
    """Copies publishing history data across archives."""

     def clonePackages(
- origin, destination, distroarchseries_list=None,
- proc_families=None, sourcepackagenames=None,
- always_create=False, no_duplicates=False):
- """Copies the source packages from origin to destination as
- well as the binary packages for the DistroArchSeries specified.
+ origin, destination, distroarchseries_list=None,
+ proc_families=None, sourcepackagenames=None,
+ always_create=False, no_duplicates):
- """Copies the source packages from origin to destination as
- well as the binary packages for the DistroArchSeries
specified.+ """Copy packages from origin to destination.
+
+ Copies the source packages, as well as the binary packages for the
+ specified `DistroArchSeries`.

That is, the nothing-after-the-( was right, but the indenting was
wrong (which your variant also fixed).

This doesn't particularly bother me but I thought you might like to know ;)

-Rob

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
--- lib/lp/bugs/interfaces/bugtask.py 2011-08-23 04:38:33 +0000
+++ lib/lp/bugs/interfaces/bugtask.py 2011-08-24 05:31:36 +0000
@@ -1597,7 +1597,7 @@
1597 The assignee and the assignee's validity are precached.1597 The assignee and the assignee's validity are precached.
1598 """1598 """
15991599
1600 def getBugTaskTargetMilestones(bugtasks, eager=False):1600 def getBugTaskTargetMilestones(bugtasks):
1601 """Get all the milestones for the selected bugtasks' targets."""1601 """Get all the milestones for the selected bugtasks' targets."""
16021602
1603 open_bugtask_search = Attribute("A search returning open bugTasks.")1603 open_bugtask_search = Attribute("A search returning open bugTasks.")
16041604
=== modified file 'lib/lp/code/interfaces/branchjob.py'
--- lib/lp/code/interfaces/branchjob.py 2011-06-20 18:58:27 +0000
+++ lib/lp/code/interfaces/branchjob.py 2011-08-24 05:31:36 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4# pylint: disable-msg=E0211,E02134# pylint: disable-msg=E0211,E0213
@@ -111,10 +111,11 @@
111111
112class IBranchUpgradeJobSource(IJobSource):112class IBranchUpgradeJobSource(IJobSource):
113113
114 def create(branch):114 def create(branch, requester):
115 """Upgrade a branch to a more current format.115 """Upgrade a branch to a more current format.
116116
117 :param branch: The database branch to upgrade.117 :param branch: The database branch to upgrade.
118 :param requester: The person requesting the upgrade.
118 """119 """
119120
120121
121122
=== modified file 'lib/lp/soyuz/interfaces/packagecloner.py'
--- lib/lp/soyuz/interfaces/packagecloner.py 2011-06-23 12:28:10 +0000
+++ lib/lp/soyuz/interfaces/packagecloner.py 2011-08-24 05:31:36 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4# pylint: disable-msg=E0211,E02134# pylint: disable-msg=E0211,E0213
@@ -17,12 +17,13 @@
17class IPackageCloner(Interface):17class IPackageCloner(Interface):
18 """Copies publishing history data across archives."""18 """Copies publishing history data across archives."""
1919
20 def clonePackages(20 def clonePackages(origin, destination, distroarchseries_list=None,
21 origin, destination, distroarchseries_list=None,21 proc_families=None, sourcepackagenames=None,
22 proc_families=None, sourcepackagenames=None,22 always_create=False):
23 always_create=False, no_duplicates=False):23 """Copy packages from origin to destination.
24 """Copies the source packages from origin to destination as24
25 well as the binary packages for the DistroArchSeries specified.25 Copies the source packages, as well as the binary packages for the
26 specified `DistroArchSeries`.
2627
27 :param origin: the location from which packages are to be copied.28 :param origin: the location from which packages are to be copied.
28 :param destination: the location to which the data is to be copied.29 :param destination: the location to which the data is to be copied.
@@ -33,8 +34,6 @@
33 :param sourcepackagenames: the source packages which are to be34 :param sourcepackagenames: the source packages which are to be
34 copied.35 copied.
35 :param always_create: if builds should always be created.36 :param always_create: if builds should always be created.
36 :param no_duplicates: if we should prevent the duplication of packages
37 with identical sourcepackagename in the destination.
38 """37 """
3938
40 def mergeCopy(origin, destination):39 def mergeCopy(origin, destination):
4140
=== modified file 'lib/lp/soyuz/interfaces/packagediff.py'
--- lib/lp/soyuz/interfaces/packagediff.py 2011-08-23 04:38:33 +0000
+++ lib/lp/soyuz/interfaces/packagediff.py 2011-08-24 05:31:36 +0000
@@ -114,7 +114,7 @@
114 EmptyResultSet is returned.114 EmptyResultSet is returned.
115 """115 """
116116
117 def getDiffBetweenReleases(self, from_spr, to_spr):117 def getDiffBetweenReleases(from_spr, to_spr):
118 """Return the diff that is targetted to the two SPRs.118 """Return the diff that is targetted to the two SPRs.
119119
120 :param from_spr: a `SourcePackageRelease` object.120 :param from_spr: a `SourcePackageRelease` object.