Skip to content

Commit 13a669a

Browse files
authored
chore: update generated noxfile.py to cater for grafeas (#2380)
1 parent 964ceaf commit 13a669a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

gapic/templates/noxfile.py.j2

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ import nox
1515
BLACK_VERSION = "black[jupyter]==23.7.0"
1616
ISORT_VERSION = "isort==5.11.0"
1717

18-
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
18+
{% if api.naming.module_namespace %}
19+
LINT_PATHS = ["docs", "{{ api.naming.module_namespace[0] }}", "tests", "noxfile.py", "setup.py"]
20+
{% else %}
21+
LINT_PATHS = ["docs", "{{ api.naming.versioned_module_name }}", "tests", "noxfile.py", "setup.py"]
22+
{% endif %}
1923

2024
ALL_PYTHON = [
2125
"3.7",
@@ -139,7 +143,11 @@ def lint(session):
139143
*LINT_PATHS,
140144
)
141145

142-
session.run("flake8", "google", "tests")
146+
{% if api.naming.module_namespace %}
147+
session.run("flake8", "{{ api.naming.module_namespace[0] }}", "tests")
148+
{% else %}
149+
session.run("flake8", "{{ api.naming.versioned_module_name }}, "tests")
150+
{% endif %}
143151

144152

145153
@nox.session(python=DEFAULT_PYTHON_VERSION)

0 commit comments

Comments
 (0)