Skip to content

Commit 91a6167

Browse files
committed
feat: centralize mypy config
1 parent 978de98 commit 91a6167

1 file changed

Lines changed: 94 additions & 0 deletions

File tree

mypy.ini

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[mypy]
2+
python_version = 3.14
3+
namespace_packages = True
4+
ignore_missing_imports = False
5+
6+
# Helps mypy navigate the "google" namespace more reliably in 3.10+
7+
explicit_package_bases = True
8+
9+
# Performance: reuse results from previous runs to speed up "nox"
10+
incremental = True
11+
12+
exclude = (?x)(
13+
^third_party/
14+
| tests/unit/resources/
15+
| tests/unit/gapic/
16+
)
17+
18+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
19+
# Dependencies that historically lacks py.typed markers
20+
[mypy-google.iam.*]
21+
ignore_missing_imports = True
22+
23+
[mypy-google.type.*]
24+
ignore_missing_imports = True
25+
26+
27+
# ==============================================================================
28+
# PACKAGE-SPECIFIC OVERRIDES
29+
# ==============================================================================
30+
31+
# --- google-cloud-core ---
32+
[mypy-google.protobuf.*]
33+
ignore_missing_imports = True
34+
35+
# --- bigframes ---
36+
[mypy-cloudpickle.*]
37+
ignore_missing_imports = True
38+
[mypy-flask]
39+
ignore_missing_imports = True
40+
[mypy-pydata_google_auth]
41+
ignore_missing_imports = True
42+
[mypy-google.colab]
43+
ignore_missing_imports = True
44+
[mypy-pytz]
45+
ignore_missing_imports = True
46+
[mypy-pyarrow.*]
47+
ignore_missing_imports = True
48+
[mypy-ibis.*]
49+
ignore_missing_imports = True
50+
[mypy-ipywidgets]
51+
ignore_missing_imports = True
52+
[mypy-google.cloud.pubsub]
53+
ignore_missing_imports = True
54+
[mypy-google.cloud.bigtable]
55+
ignore_missing_imports = True
56+
[mypy-anywidget]
57+
ignore_missing_imports = True
58+
59+
# --- google-cloud-bigtable ---
60+
[mypy-google.cloud.bigtable.*]
61+
check_untyped_defs = True
62+
warn_unreachable = True
63+
disallow_any_generics = True
64+
ignore_errors = True
65+
66+
[mypy-google.cloud.bigtable.data.*]
67+
ignore_errors = False
68+
69+
[mypy-grpc.*]
70+
ignore_missing_imports = True
71+
[mypy-google.auth.*]
72+
ignore_missing_imports = True
73+
[mypy-google.longrunning.*]
74+
ignore_missing_imports = True
75+
[mypy-google.oauth2.*]
76+
ignore_missing_imports = True
77+
[mypy-google.rpc.*]
78+
ignore_missing_imports = True
79+
[mypy-proto.*]
80+
ignore_missing_imports = True
81+
[mypy-pytest]
82+
ignore_missing_imports = True
83+
84+
# --- google-cloud-datastore ---
85+
[mypy-google.cloud.datastore._app_engine_key_pb2]
86+
ignore_errors = True
87+
88+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
89+
# Remove once this generator bug is fixed
90+
[mypy-google.cloud.datastore_v1.services.datastore.async_client]
91+
ignore_errors = True
92+
93+
[mypy-google.cloud.datastore_v1.services.datastore.client]
94+
ignore_errors = True

0 commit comments

Comments
 (0)