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
1=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
2--- lib/lp/bugs/interfaces/bugtask.py 2011-08-23 04:38:33 +0000
3+++ lib/lp/bugs/interfaces/bugtask.py 2011-08-24 05:31:36 +0000
4@@ -1597,7 +1597,7 @@
5 The assignee and the assignee's validity are precached.
6 """
7
8- def getBugTaskTargetMilestones(bugtasks, eager=False):
9+ def getBugTaskTargetMilestones(bugtasks):
10 """Get all the milestones for the selected bugtasks' targets."""
11
12 open_bugtask_search = Attribute("A search returning open bugTasks.")
13
14=== modified file 'lib/lp/code/interfaces/branchjob.py'
15--- lib/lp/code/interfaces/branchjob.py 2011-06-20 18:58:27 +0000
16+++ lib/lp/code/interfaces/branchjob.py 2011-08-24 05:31:36 +0000
17@@ -1,4 +1,4 @@
18-# Copyright 2009 Canonical Ltd. This software is licensed under the
19+# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
20 # GNU Affero General Public License version 3 (see the file LICENSE).
21
22 # pylint: disable-msg=E0211,E0213
23@@ -111,10 +111,11 @@
24
25 class IBranchUpgradeJobSource(IJobSource):
26
27- def create(branch):
28+ def create(branch, requester):
29 """Upgrade a branch to a more current format.
30
31 :param branch: The database branch to upgrade.
32+ :param requester: The person requesting the upgrade.
33 """
34
35
36
37=== modified file 'lib/lp/soyuz/interfaces/packagecloner.py'
38--- lib/lp/soyuz/interfaces/packagecloner.py 2011-06-23 12:28:10 +0000
39+++ lib/lp/soyuz/interfaces/packagecloner.py 2011-08-24 05:31:36 +0000
40@@ -1,4 +1,4 @@
41-# Copyright 2009 Canonical Ltd. This software is licensed under the
42+# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
43 # GNU Affero General Public License version 3 (see the file LICENSE).
44
45 # pylint: disable-msg=E0211,E0213
46@@ -17,12 +17,13 @@
47 class IPackageCloner(Interface):
48 """Copies publishing history data across archives."""
49
50- def clonePackages(
51- origin, destination, distroarchseries_list=None,
52- proc_families=None, sourcepackagenames=None,
53- always_create=False, no_duplicates=False):
54- """Copies the source packages from origin to destination as
55- well as the binary packages for the DistroArchSeries specified.
56+ def clonePackages(origin, destination, distroarchseries_list=None,
57+ proc_families=None, sourcepackagenames=None,
58+ always_create=False):
59+ """Copy packages from origin to destination.
60+
61+ Copies the source packages, as well as the binary packages for the
62+ specified `DistroArchSeries`.
63
64 :param origin: the location from which packages are to be copied.
65 :param destination: the location to which the data is to be copied.
66@@ -33,8 +34,6 @@
67 :param sourcepackagenames: the source packages which are to be
68 copied.
69 :param always_create: if builds should always be created.
70- :param no_duplicates: if we should prevent the duplication of packages
71- with identical sourcepackagename in the destination.
72 """
73
74 def mergeCopy(origin, destination):
75
76=== modified file 'lib/lp/soyuz/interfaces/packagediff.py'
77--- lib/lp/soyuz/interfaces/packagediff.py 2011-08-23 04:38:33 +0000
78+++ lib/lp/soyuz/interfaces/packagediff.py 2011-08-24 05:31:36 +0000
79@@ -114,7 +114,7 @@
80 EmptyResultSet is returned.
81 """
82
83- def getDiffBetweenReleases(self, from_spr, to_spr):
84+ def getDiffBetweenReleases(from_spr, to_spr):
85 """Return the diff that is targetted to the two SPRs.
86
87 :param from_spr: a `SourcePackageRelease` object.