Skip to content

Commit

Permalink
Make Flake8 happy.
Browse files Browse the repository at this point in the history
modified:   src/Products/PythonScripts/PythonScript.py
modified:   src/Products/PythonScripts/standard.py
modified:   src/Products/PythonScripts/tests/testPythonScript.py
  • Loading branch information
jugmac00 committed Aug 14, 2019
1 parent f89eed4 commit cd45a4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/Products/PythonScripts/PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ def __init__(self, id):
security = ClassSecurityInfo()

security.declareObjectProtected('View')
security.declareProtected('View', '__call__') # NOQA: flake8: D001
security.declareProtected('View', '__call__') # noqa: D001

security.declareProtected( # NOQA: flake8: D001
security.declareProtected( # noqa: D001
'View management screens',
'ZPythonScriptHTML_editForm', 'manage_main', 'read',
'ZScriptHTML_tryForm', 'PrincipiaSearchSource',
Expand All @@ -150,7 +150,7 @@ def __init__(self, id):
manage = manage_main = ZPythonScriptHTML_editForm
ZPythonScriptHTML_editForm._setName('ZPythonScriptHTML_editForm')

security.declareProtected( # NOQA: flake8: D001
security.declareProtected( # noqa: D001
'Change Python Scripts',
'ZPythonScriptHTML_editAction',
'ZPythonScript_setTitle', 'ZPythonScript_edit',
Expand Down Expand Up @@ -376,7 +376,7 @@ def _validateProxy(self, roles=None):
'because you do not have proxy roles.\n<!--%s, %s-->' % (
self.id, user, roles))

security.declareProtected( # NOQA: flake8: D001
security.declareProtected( # noqa: D001
'Change proxy roles',
'manage_proxyForm', 'manage_proxy')

Expand All @@ -395,7 +395,7 @@ def manage_proxy(self, roles=(), REQUEST=None):
message='Your changes have been saved',
action='manage_main')

security.declareProtected( # NOQA: flake8: D001
security.declareProtected( # NOQA: D001
'Change Python Scripts',
'PUT', 'manage_FTPput', 'write')

Expand Down
2 changes: 1 addition & 1 deletion src/Products/PythonScripts/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

security = ModuleSecurityInfo('Products.PythonScripts.standard')

security.declarePublic( # NOQA: flake8: D001
security.declarePublic( # noqa: D001
'special_formats',
'whole_dollars',
'dollars_and_cents',
Expand Down
6 changes: 3 additions & 3 deletions src/Products/PythonScripts/tests/testPythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def setUp(self):
from AccessControl.SecurityInfo import _appliedModuleSecurity
self._ms_before = _moduleSecurity.copy()
self._ams_before = _appliedModuleSecurity.copy()
ModuleSecurityInfo('string').declarePublic('split') # NOQA: D001
ModuleSecurityInfo('sets').declarePublic('Set') # NOQA: flake8: D001
ModuleSecurityInfo('string').declarePublic('split') # noqa: D001
ModuleSecurityInfo('sets').declarePublic('Set') # noqa: D001
newSecurityManager(None, None)

def tearDown(self):
Expand Down Expand Up @@ -359,7 +359,7 @@ def setUp(self):
self.browser = Browser()
self.browser.addHeader(
'Authorization',
'basic {}'.format(codecs.encode( # NOQA: flake8: P101
'basic {}'.format(codecs.encode( # noqa: P101
b'manager:manager_pass', 'base64').decode()))
self.browser.open('http://localhost/py_script/manage_main')

Expand Down

0 comments on commit cd45a4e

Please sign in to comment.