File tree Expand file tree Collapse file tree
packages/gapic-generator/tests/integration/goldens Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
Original file line number Diff line number Diff line change 4848
4949CURRENT_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+
5154if (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" ,
You can’t perform that action at this time.
0 commit comments