Skip to content

Commit 61e9bc6

Browse files
Bump minimal Python version to 3.9 (#698)
1 parent 1b17b1a commit 61e9bc6

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "linode-cli"
77
authors = [{ name = "Akamai Technologies Inc.", email = "[email protected]" }]
88
description = "The official command-line interface for interacting with the Linode API."
99
readme = "README.md"
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.9"
1111
license = { text = "BSD-3-Clause" }
1212
classifiers = []
1313
dependencies = [
@@ -54,7 +54,7 @@ line_length = 80
5454

5555
[tool.black]
5656
line-length = 80
57-
target-version = ["py37", "py38", "py39", "py310", "py311"]
57+
target-version = ["py39", "py310", "py311", "py312", "py313"]
5858

5959
[tool.autoflake]
6060
expand-star-imports = true

tests/unit/test_api_request.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,9 @@ def json_func():
447447
status_code=200, reason="OK", headers={"X-Spec-Version": "1.1.0"}
448448
)
449449

450-
with contextlib.redirect_stderr(stderr_buf), patch(
451-
"linodecli.api_request.requests.get", mock_http_response
450+
with (
451+
contextlib.redirect_stderr(stderr_buf),
452+
patch("linodecli.api_request.requests.get", mock_http_response),
452453
):
453454
api_request._attempt_warn_old_version(mock_cli, mock_response)
454455

@@ -491,8 +492,9 @@ def json_func():
491492
status_code=200, reason="OK", headers={"X-Spec-Version": "1.1.0"}
492493
)
493494

494-
with contextlib.redirect_stderr(stderr_buf), patch(
495-
"linodecli.api_request.requests.get", mock_http_response
495+
with (
496+
contextlib.redirect_stderr(stderr_buf),
497+
patch("linodecli.api_request.requests.get", mock_http_response),
496498
):
497499
api_request._attempt_warn_old_version(mock_cli, mock_response)
498500

@@ -525,8 +527,9 @@ def json_func():
525527
status_code=200, reason="OK", headers={"X-Spec-Version": "1.0.0"}
526528
)
527529

528-
with contextlib.redirect_stderr(stderr_buf), patch(
529-
"linodecli.api_request.requests.get", mock_http_response
530+
with (
531+
contextlib.redirect_stderr(stderr_buf),
532+
patch("linodecli.api_request.requests.get", mock_http_response),
530533
):
531534
api_request._attempt_warn_old_version(mock_cli, mock_response)
532535

tests/unit/test_overrides.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ def patch_func(*a):
3535
OUTPUT_OVERRIDES[override_signature](*a)
3636
return True
3737

38-
with patch(
39-
"linodecli.baked.operation.OUTPUT_OVERRIDES",
40-
{override_signature: patch_func},
41-
), patch.object(mock_cli.output_handler, "print") as p:
38+
with (
39+
patch(
40+
"linodecli.baked.operation.OUTPUT_OVERRIDES",
41+
{override_signature: patch_func},
42+
),
43+
patch.object(mock_cli.output_handler, "print") as p,
44+
):
4245
list_operation_for_overrides_test.process_response_json(
4346
response_json, mock_cli.output_handler
4447
)

0 commit comments

Comments
 (0)