Skip to content

Commit bd7bfbf

Browse files
committed
chore: updates linting for the noxfiles
1 parent 53d4872 commit bd7bfbf

File tree

18 files changed

+141
-75
lines changed

18 files changed

+141
-75
lines changed

packages/bigquery-magics/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import pathlib
2323
import re
2424
import shutil
25-
from typing import Dict, List
2625
import warnings
26+
from typing import Dict, List
2727

2828
import nox
2929

@@ -178,8 +178,10 @@ def format(session):
178178

179179
# 2. Run Ruff to fix imports
180180
session.run(
181-
"ruff", "check",
182-
"--select", "I",
181+
"ruff",
182+
"check",
183+
"--select",
184+
"I",
183185
"--fix",
184186
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
185187
"--line-length=88",
@@ -188,7 +190,8 @@ def format(session):
188190

189191
# 3. Run Ruff to format code
190192
session.run(
191-
"ruff", "format",
193+
"ruff",
194+
"format",
192195
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
193196
"--line-length=88",
194197
*LINT_PATHS,

packages/db-dtypes/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import pathlib
2323
import re
2424
import shutil
25-
from typing import Dict, List
2625
import warnings
26+
from typing import Dict, List
2727

2828
import nox
2929

@@ -130,8 +130,10 @@ def format(session):
130130

131131
# 2. Run Ruff to fix imports
132132
session.run(
133-
"ruff", "check",
134-
"--select", "I",
133+
"ruff",
134+
"check",
135+
"--select",
136+
"I",
135137
"--fix",
136138
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
137139
"--line-length=88",
@@ -140,7 +142,8 @@ def format(session):
140142

141143
# 3. Run Ruff to format code
142144
session.run(
143-
"ruff", "format",
145+
"ruff",
146+
"format",
144147
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
145148
"--line-length=88",
146149
*LINT_PATHS,

packages/google-api-core/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# PIP_INDEX_URL=https://pypi.org/simple nox
1919

2020
from __future__ import absolute_import
21+
2122
import os
2223
import pathlib
2324
import re
@@ -27,7 +28,6 @@
2728
# https://github.com/google/importlab/issues/25
2829
import nox
2930

30-
3131
BLACK_VERSION = "black==23.7.0"
3232
RUFF_VERSION = "ruff==0.14.14"
3333
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
@@ -83,8 +83,10 @@ def format(session):
8383

8484
# 2. Run Ruff to fix imports
8585
session.run(
86-
"ruff", "check",
87-
"--select", "I",
86+
"ruff",
87+
"check",
88+
"--select",
89+
"I",
8890
"--fix",
8991
f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
9092
"--line-length=88",
@@ -93,7 +95,8 @@ def format(session):
9395

9496
# 3. Run Ruff to format code
9597
session.run(
96-
"ruff", "format",
98+
"ruff",
99+
"format",
97100
f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
98101
"--line-length=88",
99102
*BLACK_PATHS,

packages/google-auth-httplib2/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import pathlib
2121
import re
2222
import shutil
23-
from typing import Dict, List
2423
import warnings
24+
from typing import Dict, List
2525

2626
import nox
2727

@@ -126,8 +126,10 @@ def format(session):
126126

127127
# 2. Run Ruff to fix imports
128128
session.run(
129-
"ruff", "check",
130-
"--select", "I",
129+
"ruff",
130+
"check",
131+
"--select",
132+
"I",
131133
"--fix",
132134
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
133135
"--line-length=88",
@@ -136,7 +138,8 @@ def format(session):
136138

137139
# 3. Run Ruff to format code
138140
session.run(
139-
"ruff", "format",
141+
"ruff",
142+
"format",
140143
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
141144
"--line-length=88",
142145
*LINT_PATHS,

packages/google-auth-oauthlib/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import pathlib
2323
import re
2424
import shutil
25-
from typing import Dict, List
2625
import warnings
26+
from typing import Dict, List
2727

2828
import nox
2929

@@ -111,8 +111,10 @@ def format(session):
111111

112112
# 2. Run Ruff to fix imports
113113
session.run(
114-
"ruff", "check",
115-
"--select", "I",
114+
"ruff",
115+
"check",
116+
"--select",
117+
"I",
116118
"--fix",
117119
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
118120
"--line-length=88",
@@ -121,7 +123,8 @@ def format(session):
121123

122124
# 3. Run Ruff to format code
123125
session.run(
124-
"ruff", "format",
126+
"ruff",
127+
"format",
125128
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
126129
"--line-length=88",
127130
*LINT_PATHS,

packages/google-auth/noxfile.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ def format(session):
109109

110110
# 2. Run Ruff to fix imports
111111
session.run(
112-
"ruff", "check",
113-
"--select", "I",
112+
"ruff",
113+
"check",
114+
"--select",
115+
"I",
114116
"--fix",
115117
f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
116118
"--line-length=88",
@@ -119,7 +121,8 @@ def format(session):
119121

120122
# 3. Run Ruff to format code
121123
session.run(
122-
"ruff", "format",
124+
"ruff",
125+
"format",
123126
f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
124127
"--line-length=88",
125128
*BLACK_PATHS,

packages/google-cloud-bigquery/noxfile.py

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

1515
from __future__ import absolute_import
1616

17-
from functools import wraps
1817
import os
1918
import pathlib
2019
import re
2120
import shutil
2221
import time
22+
from functools import wraps
2323

2424
import nox
2525

@@ -561,8 +561,10 @@ def format(session: nox.sessions.Session) -> None:
561561

562562
# 2. Run Ruff to fix imports
563563
session.run(
564-
"ruff", "check",
565-
"--select", "I",
564+
"ruff",
565+
"check",
566+
"--select",
567+
"I",
566568
"--fix",
567569
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
568570
"--line-length=88",
@@ -571,7 +573,8 @@ def format(session: nox.sessions.Session) -> None:
571573

572574
# 3. Run Ruff to format code
573575
session.run(
574-
"ruff", "format",
576+
"ruff",
577+
"format",
575578
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
576579
"--line-length=88",
577580
*BLACK_PATHS,

packages/google-cloud-core/noxfile.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# limitations under the License.
1414

1515
from __future__ import absolute_import
16+
1617
import os
1718
import re
1819
import shutil
1920

2021
import nox
2122

22-
2323
BLACK_VERSION = "black==23.7.0"
2424
RUFF_VERSION = "ruff==0.14.14"
2525
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
@@ -86,8 +86,10 @@ def format(session):
8686

8787
# 2. Run Ruff to fix imports
8888
session.run(
89-
"ruff", "check",
90-
"--select", "I",
89+
"ruff",
90+
"check",
91+
"--select",
92+
"I",
9193
"--fix",
9294
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
9395
"--line-length=88",
@@ -96,7 +98,8 @@ def format(session):
9698

9799
# 3. Run Ruff to format code
98100
session.run(
99-
"ruff", "format",
101+
"ruff",
102+
"format",
100103
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
101104
"--line-length=88",
102105
*BLACK_PATHS,
@@ -370,7 +373,7 @@ def core_deps_from_source(session, protobuf_implementation):
370373
f"{CURRENT_DIRECTORY}/../google-api-core",
371374
f"{CURRENT_DIRECTORY}/../google-auth",
372375
f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1",
373-
f"{CURRENT_DIRECTORY}/../proto-plus"
376+
f"{CURRENT_DIRECTORY}/../proto-plus",
374377
]
375378

376379
for dep in core_dependencies_from_source:

packages/google-cloud-dns/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import pathlib
2323
import re
2424
import shutil
25-
from typing import Dict, List
2625
import warnings
26+
from typing import Dict, List
2727

2828
import nox
2929

@@ -126,8 +126,10 @@ def format(session):
126126

127127
# 2. Run Ruff to fix imports
128128
session.run(
129-
"ruff", "check",
130-
"--select", "I",
129+
"ruff",
130+
"check",
131+
"--select",
132+
"I",
131133
"--fix",
132134
f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
133135
"--line-length=88",
@@ -136,7 +138,8 @@ def format(session):
136138

137139
# 3. Run Ruff to format code
138140
session.run(
139-
"ruff", "format",
141+
"ruff",
142+
"format",
140143
f"--target-version=py{ALL_PYTHON[0].replace('.', '')}",
141144
"--line-length=88",
142145
*LINT_PATHS,

packages/google-cloud-documentai-toolbox/noxfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import pathlib
2323
import re
2424
import shutil
25-
from typing import Dict, List
2625
import warnings
26+
from typing import Dict, List
2727

2828
import nox
2929

@@ -128,8 +128,10 @@ def format(session):
128128

129129
# 2. Run Ruff to fix imports
130130
session.run(
131-
"ruff", "check",
132-
"--select", "I",
131+
"ruff",
132+
"check",
133+
"--select",
134+
"I",
133135
"--fix",
134136
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
135137
"--line-length=88",
@@ -138,7 +140,8 @@ def format(session):
138140

139141
# 3. Run Ruff to format code
140142
session.run(
141-
"ruff", "format",
143+
"ruff",
144+
"format",
142145
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
143146
"--line-length=88",
144147
*LINT_PATHS,

0 commit comments

Comments
 (0)