Fix linters and bindep on jammy

Bump linter requirements - follow the changes
made in keystone in commits
6dfde5b48b388e32e34a385c3a9ef48da7c7c49b and
5c71ebd7a92d25df83e2e7cc5fad9990e9eebbf5 in
order to fix compatibility with Python 3.10.

Remove python-dev from bindep - it's no longer
supported by jammy and lead us to the following
errors with the announce-release job:

```
No package matching 'python-dev' is available
```

Co-Authored-By: Herve Beraud <hberaud@redhat.com>
Change-Id: If687a2678733ce018bd31c602140f073ab1a1a65
This commit is contained in:
Hervé Beraud 2022-11-07 10:54:38 +01:00 committed by Pavlo Shchelokovskyy
parent aa9c5d230f
commit 11faa0e67d
6 changed files with 8 additions and 10 deletions

View File

@ -2,7 +2,7 @@
# see https://docs.openstack.org/infra/bindep/ for additional information.
build-essential [platform:dpkg test]
python-dev [platform:dpkg test]
python3-dev [platform:dpkg test]
python3-devel [platform:rpm test]
libkrb5-dev [platform:dpkg test]
krb5-devel [platform:rpm test]

View File

@ -197,7 +197,7 @@ def normalize_version_number(version):
Examples: (1,), [1, 2], ('12', '34', '56'), (LATEST,), (2, 'latest')
:return: A tuple of len >= 2 comprising integers and/or LATEST.
:raises TypeError: If the input version cannot be interpreted.
"""
""" # noqa: D412
# Copy the input var so the error presents the original value
ver = version

View File

@ -46,7 +46,6 @@ class OAuth2ClientCredentialMethod(base.AuthMethod):
data for the auth type.
:rtype: tuple(string, dict)
"""
auth_data = {
'id': self.oauth2_client_id,
'secret': self.oauth2_client_secret
@ -67,7 +66,6 @@ class OAuth2ClientCredentialMethod(base.AuthMethod):
should be prefixed with the plugin identifier. For example the password
plugin returns its username value as 'password_username'.
"""
return dict(('oauth2_client_credential_%s' % p, getattr(self, p))
for p in self._method_parameters)
@ -100,7 +98,6 @@ class OAuth2ClientCredential(base.AuthConstructor):
dict is a valid, non-failure response.
:rtype: dict
"""
# get headers for X-Auth-Token
headers = super(OAuth2ClientCredential, self).get_headers(
session, **kwargs)

View File

@ -452,7 +452,7 @@ class OidcAccessToken(_OidcBase):
self.access_token = access_token
def get_payload(self, session):
"""OidcAccessToken does not require a payload."""
"""OidcAccessToken does not require a payload.""" # noqa: D403
return {}
def get_unscoped_auth_ref(self, session):

View File

@ -2,10 +2,9 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=3.0.1,<3.1.0 # Apache-2.0
flake8-docstrings==0.2.1.post1 # MIT
hacking~=4.1.0 # Apache-2.0
flake8-docstrings~=1.6.0 # MIT
flake8-import-order>=0.17.1 #LGPLv3
pycodestyle>=2.0.0,<2.6.0 # MIT
bandit<1.6.0,>=1.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0

View File

@ -53,10 +53,12 @@ commands = oslo_debug_helper -t keystoneauth1/tests {posargs}
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# 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
# W503 line break before binary operator
# W504 line break after binary operator
ignore = D100,D101,D102,D103,D104,D203,W503,W504
ignore = D100,D101,D102,D103,D104,D107,D203,D401,W503,W504
# H106: Dont put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
enable-extensions=H106,H203