Skip to content

Commit

Permalink
make flake8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Apr 11, 2023
1 parent 5f5c099 commit d675f76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions plone/protect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from plone.protect.authenticator import check as CheckAuthenticator
from plone.protect.authenticator import createToken
from plone.protect.authenticator import CustomCheckAuthenticator
from plone.protect.postonly import check as PostOnly
from plone.protect.utils import protect
from plone.protect.authenticator import check as CheckAuthenticator # noqa: F401
from plone.protect.authenticator import createToken # noqa: F401
from plone.protect.authenticator import CustomCheckAuthenticator # noqa: F401
from plone.protect.postonly import check as PostOnly # noqa: F401
from plone.protect.utils import protect # noqa: F401
3 changes: 1 addition & 2 deletions plone/protect/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class ProtectTransform:
and no CSRF protection...
"""


# should be last lxml related transform
order = 9000

Expand Down Expand Up @@ -204,7 +203,7 @@ def check(self):
"""
try:
return self._check()
except:
except Exception:
transaction.abort()
logger.error(
"Error checking for CSRF. "
Expand Down
2 changes: 1 addition & 1 deletion plone/protect/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setUpPloneSite(self, portal):
self.portal = portal

def tearDownZope(self, app):
from plone.protect.monkey import enable_zope_csrf_checks
from plone.protect.monkey import enable_zope_csrf_checks # noqa: F401


PROTECT_FIXTURE = ProtectedLayer()
Expand Down

0 comments on commit d675f76

Please sign in to comment.