diff --git a/poetry.lock b/poetry.lock index e112cc5e..8c559719 100644 --- a/poetry.lock +++ b/poetry.lock @@ -562,14 +562,14 @@ pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "flake8-bugbear" -version = "22.12.6" +version = "23.3.12" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "flake8-bugbear-22.12.6.tar.gz", hash = "sha256:4cdb2c06e229971104443ae293e75e64c6107798229202fbe4f4091427a30ac0"}, - {file = "flake8_bugbear-22.12.6-py3-none-any.whl", hash = "sha256:b69a510634f8a9c298dfda2b18a8036455e6b19ecac4fe582e4d7a0abfa50a30"}, + {file = "flake8-bugbear-23.3.12.tar.gz", hash = "sha256:e3e7f74c8a49ad3794a7183353026dabd68c74030d5f46571f84c1fb0eb79363"}, + {file = "flake8_bugbear-23.3.12-py3-none-any.whl", hash = "sha256:beb5c7efcd7ccc2039ef66a77bb8db925e7be3531ff1cb4d0b7030d0e2113d72"}, ] [package.dependencies] @@ -577,7 +577,7 @@ attrs = ">=19.2.0" flake8 = ">=3.0.0" [package.extras] -dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "tox"] +dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "pytest", "tox"] [[package]] name = "flake8-docstrings" @@ -2277,4 +2277,4 @@ cli = ["click", "tabulate", "dateparser"] [metadata] lock-version = "2.0" python-versions = ">=3.7.1,<4.0" -content-hash = "9646a6cb97c77adfd493c8677cfc0acbfdbbb1b5e35c3dd245c48a82e910eddf" +content-hash = "b5034db5be500c541ad98c12703430ca32f6f96b81bcdf1bed12067ddffdc1d5" diff --git a/pyproject.toml b/pyproject.toml index 424f24b8..91b047d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ pre-commit = "^2.21.0" bandit = "^1.7.5" flake8 = ">=4.0.1,<6.0.0" black = "^22.12" -flake8-bugbear = "^22.12.6" +flake8-bugbear = ">=22.12.6,<24.0.0" flake8-docstrings = "^1.7.0" flake8-rst-docstrings = "^0.3.0" pep8-naming = "^0.13.2" diff --git a/src/renault_api/kamereon/__init__.py b/src/renault_api/kamereon/__init__.py index 95478654..c02a7dc1 100644 --- a/src/renault_api/kamereon/__init__.py +++ b/src/renault_api/kamereon/__init__.py @@ -146,7 +146,9 @@ async def request( # Some endpoints return arrays instead of objects. # These need to be wrapped in an object. if response_text.startswith("["): - response_text = f'{{"{wrap_array_in or "data"}": {response_text}}}' + response_text = ( + f'{{"{wrap_array_in or "data"}": {response_text}}}' # noqa: B907 + ) if not response_text.startswith("{"): # Check for HTTP error http_response.raise_for_status() diff --git a/tests/cli/test_vehicle.py b/tests/cli/test_vehicle.py index d7f3baa1..cb2b134b 100644 --- a/tests/cli/test_vehicle.py +++ b/tests/cli/test_vehicle.py @@ -446,7 +446,7 @@ def test_http_post(mocked_responses: aioresponses, cli_runner: CliRunner) -> Non json_body = json.dumps(body) result = cli_runner.invoke( __main__.main, - f"http post {endpoint} '{json_body}'", + f"http post {endpoint} '{json_body}'", # noqa: B907 ) assert result.exit_code == 0, result.exception @@ -497,7 +497,7 @@ def test_http_post_file( result = cli_runner.invoke( __main__.main, - f"http post-file {endpoint} '{json_file}'", + f"http post-file {endpoint} '{json_file}'", # noqa: B907 ) assert result.exit_code == 0, result.exception diff --git a/tests/fixtures.py b/tests/fixtures.py index f2c4debf..be3888e1 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -79,7 +79,7 @@ def get_file_content_as_wrapped_schema( """Read fixture text file as specified schema.""" with open(filename, "r") as file: content = file.read() - content = f'{{"{wrap_in}": {content}}}' + content = f'{{"{wrap_in}": {content}}}' # noqa: B907 return schema.loads(content)