Skip to content

Commit 5ae98b5

Browse files
committed
test(generator): update integration test goldens with centralized mypy path
1 parent 8a618a5 commit 5ae98b5

8 files changed

Lines changed: 32 additions & 0 deletions

File tree

packages/gapic-generator/tests/integration/goldens/asset/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/logging/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/redis/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848

4949
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5050

51+
# Path to the centralized mypy configuration file at the repository root.
52+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
53+
5154
if (CURRENT_DIRECTORY / "testing").exists():
5255
LOWER_BOUND_CONSTRAINTS_FILE = (
5356
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
@@ -108,6 +111,7 @@ def mypy(session):
108111
session.install(".")
109112
session.run(
110113
"mypy",
114+
f"--config-file={MYPY_CONFIG_FILE}",
111115
"-p",
112116
"google",
113117
"--check-untyped-defs",

0 commit comments

Comments
 (0)