Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 5e7b285

Browse files
committed
update mypy template
1 parent b0f00cd commit 5e7b285

File tree

8 files changed

+32
-40
lines changed

8 files changed

+32
-40
lines changed

gapic/templates/mypy.ini.j2

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/asset/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/credentials/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/eventarc/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/logging/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/logging_internal/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/redis/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

tests/integration/goldens/redis_selective/mypy.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[mypy]
22
python_version = 3.14
33
namespace_packages = True
4+
ignore_missing_imports = False
45

5-
# FIX: Prevents failure when dependencies (like google-iam) lack type hints
6+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
7+
# Dependencies that historically lacks py.typed markers
8+
[mypy-google.iam.*]
69
ignore_missing_imports = True
710

8-
# FIX: Silences the "note: By default the bodies of untyped functions are not checked"
9-
# This keeps CI logs clean and focused on actual errors.
10-
check_untyped_defs = False
11-
1211
# Helps mypy navigate the 'google' namespace more reliably in 3.10+
1312
explicit_package_bases = True
1413

0 commit comments

Comments
 (0)