Skip to content

Commit 3698497

Browse files
committed
chore: remove code formatting for noxfile.py
1 parent f93a0eb commit 3698497

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

gapic/templates/noxfile.py.j2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ BLACK_VERSION = "black[jupyter]==23.7.0"
1616
ISORT_VERSION = "isort==5.11.0"
1717

1818
{% if api.naming.module_namespace %}
19+
FORMAT_PATHS = ["docs", "{{ api.naming.module_namespace[0] }}", "tests", "setup.py"]
1920
LINT_PATHS = ["docs", "{{ api.naming.module_namespace[0] }}", "tests", "noxfile.py", "setup.py"]
2021
{% else %}
22+
FORMAT_PATHS = ["docs", "{{ api.naming.versioned_module_name }}", "tests", "setup.py"]
2123
LINT_PATHS = ["docs", "{{ api.naming.versioned_module_name }}", "tests", "noxfile.py", "setup.py"]
2224
{% endif %}
2325

2426
# Add samples to the list of directories to format if the directory exists.
2527
if os.path.isdir("samples"):
2628
LINT_PATHS.append("samples")
29+
FORMAT_PATHS.append("samples")
2730

2831
ALL_PYTHON = [
2932
"3.7",
@@ -167,7 +170,7 @@ def blacken(session):
167170
session.install(BLACK_VERSION)
168171
session.run(
169172
"black",
170-
*LINT_PATHS,
173+
*FORMAT_PATHS,
171174
)
172175

173176

@@ -183,11 +186,11 @@ def format(session):
183186
session.run(
184187
"isort",
185188
"--fss",
186-
*LINT_PATHS,
189+
*FORMAT_PATHS,
187190
)
188191
session.run(
189192
"black",
190-
*LINT_PATHS,
193+
*FORMAT_PATHS,
191194
)
192195

193196

0 commit comments

Comments
 (0)