Skip to content

Commit

Permalink
fix aq in localroles for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed May 17, 2018
1 parent b0d5491 commit 92856a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion borg/localrole/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def _parent_chain(self, obj):
raise StopIteration
new = aq_parent(aq_inner(obj))
# if the obj is a method we get the class
obj = getattr(obj, 'im_self', new)
obj = getattr(obj, '__self__', new)

def _get_principal_ids(self, user):
"""Returns a list of the ids of all involved security
Expand Down

1 comment on commit 92856a1

@jenkins-plone-org
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbauer Jenkins CI reporting about code analysis
See the full report here: https://jenkins.plone.org/job/package-borg.localrole/30/violations

borg/localrole/tests.py:54:78: C812 missing trailing comma
borg/localrole/tests.py:60:78: C812 missing trailing comma
borg/localrole/tests.py:62:35: C812 missing trailing comma
borg/localrole/tests.py:67:78: C812 missing trailing comma
borg/localrole/tests.py:69:35: C812 missing trailing comma
borg/localrole/interfaces.py:8:58: C812 missing trailing comma
borg/localrole/interfaces.py:13:78: C812 missing trailing comma
borg/localrole/__init__.py:20:24: C812 missing trailing comma
borg/localrole/utils.py:24:9: T001 print statement found.
borg/localrole/utils.py:24:23: Q000 Remove bad quotes.
borg/localrole/utils.py:24:23: S001 found module formatter
borg/localrole/utils.py:34:27: P002 found "hasattr", consider replacing it
borg/localrole/workspace.py:22:5: Q000 Remove bad quotes.
borg/localrole/workspace.py:24:14: Q000 Remove bad quotes.
borg/localrole/workspace.py:24:50: C812 missing trailing comma
borg/localrole/workspace.py:32:17: C812 missing trailing comma
borg/localrole/workspace.py:44:42: C812 missing trailing comma
borg/localrole/workspace.py:45:14: C812 missing trailing comma
borg/localrole/workspace.py:61:19: D001 found implements( replace it with zope.interface.implementer
borg/localrole/workspace.py:136:0: P102 docstring does contain unindexed parameters
borg/localrole/workspace.py:266:13: D001 found directlyProvides( replace it with zope.interface.provider
borg/localrole/workspace.py:267:13: D001 found directlyProvides( replace it with zope.interface.provider
borg/localrole/workspace.py:375:17: Q000 Remove bad quotes.
borg/localrole/workspace.py:378:34: Q000 Remove bad quotes.
borg/localrole/workspace.py:387:16: P002 found "hasattr", consider replacing it
borg/localrole/workspace.py:441:19: T000 Todo note found.
borg/localrole/workspace.py:445:46: C812 missing trailing comma
borg/localrole/workspace.py:451:75: C812 missing trailing comma
borg/localrole/workspace.py:455:5: C901 'WorkspaceLocalRoleManager.checkLocalRolesAllowed' is too complex (14)
borg/localrole/workspace.py:479:15: T000 Todo note found.
borg/localrole/workspace.py:507:22: T000 Todo note found.
borg/localrole/workspace.py:513:7: T000 Todo note found.
borg/localrole/factory_adapter.py:24:17: D001 found implements( replace it with zope.interface.implementer
borg/localrole/factory_adapter.py:68:13: D001 found directlyProvides( replace it with zope.interface.provider
borg/localrole/factory_adapter.py:84:13: D001 found directlyProvides( replace it with zope.interface.provider
borg/localrole/factory_adapter.py:95:0: P102 docstring does contain unindexed parameters

Follow these instructions to reproduce it locally.

Please sign in to comment.