Skip to content

Commit 1afd309

Browse files
committed
feat(handwritten): centralize mypy.ini and update noxfiles
1 parent 91a6167 commit 1afd309

30 files changed

Lines changed: 69 additions & 194 deletions

File tree

mypy.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[mypy]
2-
python_version = 3.14
32
namespace_packages = True
43
ignore_missing_imports = False
54

packages/bigframes/mypy.ini

Lines changed: 0 additions & 46 deletions
This file was deleted.

packages/bigframes/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@
114114
LOGGING_NAME_ENV_VAR = "BIGFRAMES_PERFORMANCE_LOG_NAME"
115115

116116
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
117+
# Path to the centralized mypy configuration file at the repository root.
118+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
119+
117120

118121
# Sessions are executed in the order so putting the smaller sessions
119122
# ahead to fail fast at presubmit running.
@@ -1086,6 +1089,7 @@ def mypy(session):
10861089
shutil.rmtree(".mypy_cache", ignore_errors=True)
10871090
session.run(
10881091
"mypy",
1092+
f"--config-file={MYPY_CONFIG_FILE}",
10891093
"bigframes",
10901094
os.path.join("tests", "system"),
10911095
os.path.join("tests", "unit"),

packages/bigquery-magics/mypy.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/google-auth/mypy.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/google-auth/noxfile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import nox
2121

2222
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
23+
# Path to the centralized mypy configuration file at the repository root.
24+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
25+
2326

2427
CLICK_VERSION = "click"
2528
BLACK_VERSION = "black==23.7.0"
@@ -156,7 +159,8 @@ def mypy(session):
156159
"types-mock",
157160
"pytest<8.0.0",
158161
)
159-
session.run("mypy", "-p", "google", "-p", "tests", "-p", "tests_async")
162+
session.run("mypy",
163+
f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "-p", "tests", "-p", "tests_async")
160164

161165

162166
@nox.session(python=ALL_PYTHON)

packages/google-backstory/mypy.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/google-backstory/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
PREVIEW_PYTHON_VERSION = "3.14"
4747

4848
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
49+
# Path to the centralized mypy configuration file at the repository root.
50+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
51+
4952

5053
if (CURRENT_DIRECTORY / "testing").exists():
5154
LOWER_BOUND_CONSTRAINTS_FILE = (
@@ -107,6 +110,7 @@ def mypy(session):
107110
session.install(".")
108111
session.run(
109112
"mypy",
113+
f"--config-file={MYPY_CONFIG_FILE}",
110114
"-p",
111115
"google",
112116
"--check-untyped-defs",

packages/google-cloud-appengine-logging/mypy.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/google-cloud-appengine-logging/noxfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
PREVIEW_PYTHON_VERSION = "3.14"
4747

4848
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
49+
# Path to the centralized mypy configuration file at the repository root.
50+
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")
51+
4952

5053
if (CURRENT_DIRECTORY / "testing").exists():
5154
LOWER_BOUND_CONSTRAINTS_FILE = (
@@ -107,6 +110,7 @@ def mypy(session):
107110
session.install(".")
108111
session.run(
109112
"mypy",
113+
f"--config-file={MYPY_CONFIG_FILE}",
110114
"-p",
111115
"google",
112116
"--check-untyped-defs",

0 commit comments

Comments
 (0)