launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12157
[Merge] lp:~jcsackett/launchpad/too-many-findAP-methods into lp:launchpad
j.c.sackett has proposed merging lp:~jcsackett/launchpad/too-many-findAP-methods into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1052415 in Launchpad itself: "AccessPolicy.findByPillarAndGrantee() and AccessPolicy.findByPillar() are identical"
https://bugs.launchpad.net/launchpad/+bug/1052415
For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/too-many-findAP-methods/+merge/125011
Summary
=======
There is a redundant and unused method, `AccessPolicy.findByPillarAndGrantee`.
It is exactly the same as `AccessPolicy.findByPillar`
Implementation
==============
The redundant method isn't used anywhere and isn't defined on the interface.
It has been deleted.
Tests
=====
bin/test -vvct access
QA
==
None; this method had no callsites.
LoC
===
This only removes code.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/registry/model/accesspolicy.py
--
https://code.launchpad.net/~jcsackett/launchpad/too-many-findAP-methods/+merge/125011
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/too-many-findAP-methods into lp:launchpad.
=== modified file 'lib/lp/registry/model/accesspolicy.py'
--- lib/lp/registry/model/accesspolicy.py 2012-09-11 14:06:21 +0000
+++ lib/lp/registry/model/accesspolicy.py 2012-09-18 18:19:20 +0000
@@ -264,13 +264,6 @@
Or(*(cls.person == team for team in teams)))
@classmethod
- def findByPillarAndGrantee(cls, pillars):
- """See `IAccessPolicySource`."""
- return IStore(cls).find(
- cls,
- Or(*(cls._constraintForPillar(pillar) for pillar in pillars)))
-
- @classmethod
def delete(cls, pillars_and_types):
"""See `IAccessPolicySource`."""
cls.find(pillars_and_types).remove()
Follow ups