Stop pinning pep8 related packages

These practices cause conflicts periodically. Not right now:
the gate is okay with the current values, which this patch
deletes. However, like sun raising in the east it is sure
to happen again. This patch lets workarounds work that the
infra team puts in place. The downside is, we need to fix
the code once in a while as new checks get added.

Change-Id: Ia7a96fb4b6de4251862a8a96c995cefa94dbc271
This commit is contained in:
Pete Zaitcev 2023-03-31 18:44:53 -05:00
parent 1a21fbae26
commit d2deab385b
6 changed files with 8 additions and 11 deletions

View File

@ -652,7 +652,7 @@ class Manager(manager.Manager):
role_refs_to_check = list(role_refs)
ref_results = list(role_refs)
checked_role_refs = list()
while(role_refs_to_check):
while role_refs_to_check:
next_ref = role_refs_to_check.pop()
checked_role_refs.append(next_ref)
next_role_id = next_ref['role_id']

View File

@ -433,7 +433,7 @@ class FernetSetup(BasePermissionsSetup):
os.path.abspath(CONF.fernet_receipts.key_repository)):
cls.initialize_fernet_repository(
keystone_user_id, keystone_group_id, 'fernet_receipts')
elif(CONF.fernet_tokens.max_active_keys !=
elif (CONF.fernet_tokens.max_active_keys !=
CONF.fernet_receipts.max_active_keys):
# WARNING(adriant): If the directories are the same,
# 'max_active_keys' is ignored from fernet_receipts in favor of

View File

@ -64,8 +64,8 @@ class FernetUtils(object):
else:
# ensure the key repository isn't world-readable
stat_info = os.stat(self.key_repository)
if(stat_info.st_mode & stat.S_IROTH or
stat_info.st_mode & stat.S_IXOTH):
if (stat_info.st_mode & stat.S_IROTH or
stat_info.st_mode & stat.S_IXOTH):
LOG.warning(
'key_repository is world readable: %s',
self.key_repository)

View File

@ -988,7 +988,7 @@ class BaseLDAPIdentity(LDAPTestSetup, IdentityTests, AssignmentTests,
# List groups for user.
ref_list = PROVIDERS.identity_api.list_groups_for_user(public_user_id)
for ref in ref_list:
del(ref['membership_expires_at'])
del ref['membership_expires_at']
group['id'] = public_group_id
self.assertThat(ref_list, matchers.Equals([group]))

View File

@ -1,5 +1,5 @@
hacking~=4.1.0 # Apache-2.0
flake8-docstrings~=1.6.0 # MIT
hacking
flake8-docstrings
bashate~=2.1.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
freezegun>=0.3.6 # Apache-2.0

View File

@ -95,15 +95,12 @@ enable-extensions = H203,H904
# D107: Missing docstring in __init__
# D203: 1 blank line required before class docstring (deprecated in pep257)
# D401: First line should be in imperative mood; try rephrasing
# TODO(wxy): Fix the pep8 issue.
# E305:
# E402: module level import not at top of file
# H211: Use assert{Is,IsNot}instance
# H214: Use assertIn/NotIn(A, B) rather than assertTrue/False(A in/not in B) when checking collection contents.
# W503: line break before binary operator
# W504: line break after binary operator
# W605:
ignore = D100,D101,D102,D103,D104,D106,D107,D203,D401,E305,E402,H211,H214,W503,W504,W605
ignore = D100,D101,D102,D103,D104,D106,D107,D203,D401,E402,H211,H214,W503,W504
exclude = .venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
max-complexity = 24
per-file-ignores =