Skip to content

Commit 5af7582

Browse files
ci: use black isort profile and update to latest (#1211)
1 parent 720d1ad commit 5af7582

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

noxfile.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import nox
2222

23-
BLACK_VERSION = "black==23.12.1"
23+
BLACK_VERSION = "black==24.10.0"
2424
ISORT_VERSION = "isort==5.13.2"
2525

2626
LINT_PATHS = ["google", "tests", "noxfile.py", "setup.py"]
@@ -50,7 +50,10 @@ def lint(session):
5050
"--fss",
5151
"--check-only",
5252
"--diff",
53-
"--profile=google",
53+
"--profile=black",
54+
"--force-single-line-imports",
55+
"--dont-order-by-type",
56+
"--single-line-exclusions=typing",
5457
"-w=88",
5558
*LINT_PATHS,
5659
)
@@ -85,7 +88,10 @@ def format(session):
8588
session.run(
8689
"isort",
8790
"--fss",
88-
"--profile=google",
91+
"--profile=black",
92+
"--force-single-line-imports",
93+
"--dont-order-by-type",
94+
"--single-line-exclusions=typing",
8995
"-w=88",
9096
*LINT_PATHS,
9197
)

tests/unit/test_connection_name.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414

1515
import pytest # noqa F401 Needed to run the tests
1616

17-
# fmt: off
17+
from google.cloud.sql.connector.connection_name import (
18+
_parse_connection_name_with_domain_name,
19+
)
1820
from google.cloud.sql.connector.connection_name import _parse_connection_name
19-
from google.cloud.sql.connector.connection_name import \
20-
_parse_connection_name_with_domain_name
2121
from google.cloud.sql.connector.connection_name import ConnectionName
2222

23-
# fmt: on
24-
2523

2624
def test_ConnectionName() -> None:
2725
conn_name = ConnectionName("project", "region", "instance")

0 commit comments

Comments
 (0)