Bump hacking

hacking 3.0.x is too old.

Change-Id: I21778b05eea73ac3c6b5a83727e8636d0bf4752e
This commit is contained in:
Takashi Kajinami 2024-01-27 22:30:46 +09:00
parent 85fbe403fe
commit d9b1b5ad8e
7 changed files with 32 additions and 41 deletions

View File

@ -135,7 +135,7 @@ rules = [
),
policy.DocumentedRuleDefault(
name='secrets:post',
check_str=f'True:%(enforce_new_defaults)s and role:member',
check_str='True:%(enforce_new_defaults)s and role:member',
scope_types=['project'],
description='Creates a Secret entity.',
operations=[
@ -148,7 +148,7 @@ rules = [
),
policy.DocumentedRuleDefault(
name='secrets:get',
check_str=f'True:%(enforce_new_defaults)s and role:member',
check_str='True:%(enforce_new_defaults)s and role:member',
scope_types=['project'],
description='Lists a projects secrets.',
operations=[

View File

@ -17,7 +17,6 @@ import ast
import re
from hacking import core
import pycodestyle
"""
@ -152,18 +151,18 @@ class CheckLoggingFormatArgs(BaseASTChecker):
@core.flake8ext
def check_oslo_namespace_imports(physical_line, logical_line, filename):
def check_oslo_namespace_imports(logical_line, filename, noqa):
"""'oslo_' should be used instead of 'oslo.'
B317
"""
if pycodestyle.noqa(physical_line):
if noqa:
return
if re.match(oslo_namespace_imports, logical_line):
msg = ("B317: '%s' must be used instead of '%s'.") % (
logical_line.replace('oslo.', 'oslo_'),
logical_line)
yield(0, msg)
yield (0, msg)
@core.flake8ext
@ -188,4 +187,4 @@ def no_log_warn_check(logical_line):
"""
msg = ("B320: LOG.warn is deprecated, please use LOG.warning!")
if re.match(no_log_warn, logical_line):
yield(0, msg)
yield (0, msg)

View File

@ -121,7 +121,7 @@ class SimpleCryptoPlugin(c.CryptoPluginBase):
- DSA, without passphrase (supported)
- DSA, with passphrase (supported)
"""
if(generate_dto.algorithm is None or generate_dto
if (generate_dto.algorithm is None or generate_dto
.algorithm.lower() == 'rsa'):
private_key = rsa.generate_private_key(
public_exponent=65537,

View File

@ -150,7 +150,7 @@ class WhenRunningPeriodicServerRetryLogic(database_utils.RepositoryTestCase):
class WhenRunningPeriodicServer(utils.BaseTestCase):
"""Tests the timing-related functionality of the periodic task retry server.
"""Tests the timing-related functionality of the periodic server.
These tests are only concerned with whether or not periodic tasks are
actually invoked per configured schedule configuration. The logic of the

View File

@ -1047,7 +1047,7 @@ class SecretsTestCase(base.TestCase):
@testcase.attr('negative')
def test_secret_create_with_invalid_http_content_type_characters(
self, http_content_type):
"""Attempt to create secrets with invalid unicode characters in the
"""Create secrets with invalid unicode characters in the
HTTP request's Content-Type header. Should return a 415.
"""
@ -1075,7 +1075,7 @@ class SecretsTestCase(base.TestCase):
@testcase.attr('negative')
def test_secret_create_with_invalid_payload_content_type_characters(
self, payload_content_type):
"""Attempt to create secrets with non-ascii characters in the
"""Create secrets with non-ascii characters in the
payload's content type attribute. Should return a 400.
"""
@ -1296,7 +1296,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_create_unauthed_no_proj_id(self):
"""Attempt to create a secret without a token or project id
"""Create a secret without a token or project id
Should return 401
"""
@ -1307,7 +1307,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_create_unauthed_fake_proj_id(self):
"""Attempt to create a secret with a project id but no token
"""Create a secret with a project id but no token
Should return 401
"""
@ -1321,7 +1321,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_create_unauthed_real_proj_id(self):
"""Attempt to create a secret with a project id but no token
"""Create a secret with a project id but no token
Should return 401
"""
@ -1335,7 +1335,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_get_unauthed_no_proj_id_fake_secret(self):
"""Attempt to read a non-existant secret without a token or project id
"""Read a non-existant secret without a token or project id
Should return 401
"""
@ -1349,7 +1349,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_get_unauthed_no_proj_id_real_secret(self):
"""Attempt to read an existing secret without a token or project id
"""Read an existing secret without a token or project id
Should return 401
"""
@ -1363,7 +1363,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_get_unauthed_fake_proj_id_fake_secret(self):
"""Attempt to get a non-existant secret with a project id but no token
"""Get a non-existant secret with a project id but no token
Should return 401
"""
@ -1379,7 +1379,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_get_unauthed_fake_proj_id_real_secret(self):
"""Attempt to get an existing secret with a project id but no token
"""Get an existing secret with a project id but no token
Should return 401
"""
@ -1395,7 +1395,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_get_unauthed_real_proj_id_fake_secret(self):
"""Attempt to get a non-existant secret with a project id but no token
"""Get a non-existant secret with a project id but no token
Should return 401
"""
@ -1411,7 +1411,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_get_unauthed_real_proj_id_real_secret(self):
"""Attempt to get an existing secret with a project id but no token
"""Get an existing secret with a project id but no token
Should return 401
"""
@ -1427,7 +1427,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_put_unauthed_no_proj_id_fake_secret(self):
"""Attempt to update a non-existant secret without a token or project id
"""Update a non-existant secret without a token or project id
Should return 401
"""
@ -1441,7 +1441,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_put_unauthed_no_proj_id_real_secret(self):
"""Attempt to update an existing secret without a token or project id
"""Update an existing secret without a token or project id
Should return 401
"""
@ -1455,7 +1455,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_put_unauthed_fake_proj_id_fake_secret(self):
"""Attempt to update a non-existant secret with a project id, but no token
"""Update a non-existant secret with a project id, but no token
Should return 401
"""
@ -1471,7 +1471,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_put_unauthed_fake_proj_id_real_secret(self):
"""Attempt to update an existing secret with a project id, but no token
"""Update an existing secret with a project id, but no token
Should return 401
"""
@ -1487,7 +1487,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_put_unauthed_real_proj_id_fake_secret(self):
"""Attempt to update a non-existant secret with a project id, but no token
"""Update a non-existant secret with a project id, but no token
Should return 401
"""
@ -1503,7 +1503,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_put_unauthed_real_proj_id_real_secret(self):
"""Attempt to update an existing secret with a project id, but no token
"""Update an existing secret with a project id, but no token
Should return 401
"""
@ -1519,7 +1519,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_delete_unauthed_no_proj_id_fake_secret(self):
"""Attempt to delete a non-existant secret without a token or project id
"""Delete a non-existant secret without a token or project id
Should return 401
"""
@ -1531,7 +1531,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_delete_unauthed_no_proj_id_real_secret(self):
"""Attempt to delete an existing secret without a token or project id
"""Delete an existing secret without a token or project id
Should return 401
"""
@ -1543,7 +1543,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_delete_unauthed_fake_proj_id_fake_secret(self):
"""Attempt to delete a non-existant secret with a project id, but no token
"""Delete a non-existant secret with a project id, but no token
Should return 401
"""
@ -1557,7 +1557,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_delete_unauthed_fake_proj_id_real_secret(self):
"""Attempt to delete an existing secret with a project id, but no token
"""Delete an existing secret with a project id, but no token
Should return 401
"""
@ -1571,7 +1571,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_delete_unauthed_real_proj_id_fake_secret(self):
"""Attempt to delete a non-existant secret with a project id, but no token
"""Delete a non-existant secret with a project id, but no token
Should return 401
"""
@ -1585,7 +1585,7 @@ class SecretsUnauthedTestCase(base.TestCase):
@testcase.attr('negative', 'security')
def test_secret_delete_unauthed_real_proj_id_real_secret(self):
"""Attempt to delete an existing secret with a project id, but no token
"""Delete an existing secret with a project id, but no token
Should return 401
"""

View File

@ -1,6 +1,3 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
alembic>=0.8.10 # MIT
cffi>=1.7.0 # MIT
cryptography>=2.1 # BSD/Apache-2.0

View File

@ -1,9 +1,4 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# hacking should appear first in case something else depends on pep8
hacking>=3.0.1,<3.1.0 # Apache-2.0
hacking>=6.1.0,<6.2.0 # Apache-2.0
pyflakes>=2.1.1
coverage!=4.4,>=4.0 # Apache-2.0