Skip to content

Commit 8ad0d01

Browse files
ci: Move mypy config into pyproject.toml (#4181)
First step to consolidate configuration into `pyproject.toml`. --------- Co-authored-by: Daniel Szoke <[email protected]>
1 parent c295047 commit 8ad0d01

File tree

2 files changed

+133
-85
lines changed

2 files changed

+133
-85
lines changed

Diff for: mypy.ini

-84
This file was deleted.

Diff for: pyproject.toml

+133-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,136 @@ omit = [
2020
[tool.coverage.report]
2121
exclude_also = [
2222
"if TYPE_CHECKING:",
23-
]
23+
]
24+
25+
[tool.mypy]
26+
allow_redefinition = true
27+
check_untyped_defs = true
28+
disallow_any_generics = true
29+
disallow_incomplete_defs = true
30+
disallow_subclassing_any = true
31+
disallow_untyped_decorators = true
32+
disallow_untyped_defs = true
33+
no_implicit_optional = true
34+
python_version = "3.11"
35+
strict_equality = true
36+
strict_optional = true
37+
warn_redundant_casts = true
38+
warn_unused_configs = true
39+
warn_unused_ignores = true
40+
41+
# Relaxations for code written before mypy was introduced
42+
# Do not use wildcards in module paths, otherwise added modules will
43+
# automatically have the same set of relaxed rules as the rest
44+
[[tool.mypy.overrides]]
45+
module = "cohere.*"
46+
ignore_missing_imports = true
47+
48+
[[tool.mypy.overrides]]
49+
module = "django.*"
50+
ignore_missing_imports = true
51+
52+
[[tool.mypy.overrides]]
53+
module = "pyramid.*"
54+
ignore_missing_imports = true
55+
56+
[[tool.mypy.overrides]]
57+
module = "psycopg2.*"
58+
ignore_missing_imports = true
59+
60+
[[tool.mypy.overrides]]
61+
module = "pytest.*"
62+
ignore_missing_imports = true
63+
64+
[[tool.mypy.overrides]]
65+
module = "aiohttp.*"
66+
ignore_missing_imports = true
67+
68+
[[tool.mypy.overrides]]
69+
module = "anthropic.*"
70+
ignore_missing_imports = true
71+
72+
[[tool.mypy.overrides]]
73+
module = "sanic.*"
74+
ignore_missing_imports = true
75+
76+
[[tool.mypy.overrides]]
77+
module = "tornado.*"
78+
ignore_missing_imports = true
79+
80+
[[tool.mypy.overrides]]
81+
module = "fakeredis.*"
82+
ignore_missing_imports = true
83+
84+
[[tool.mypy.overrides]]
85+
module = "rq.*"
86+
ignore_missing_imports = true
87+
88+
[[tool.mypy.overrides]]
89+
module = "pyspark.*"
90+
ignore_missing_imports = true
91+
92+
[[tool.mypy.overrides]]
93+
module = "asgiref.*"
94+
ignore_missing_imports = true
95+
96+
[[tool.mypy.overrides]]
97+
module = "langchain_core.*"
98+
ignore_missing_imports = true
99+
100+
[[tool.mypy.overrides]]
101+
module = "executing.*"
102+
ignore_missing_imports = true
103+
104+
[[tool.mypy.overrides]]
105+
module = "asttokens.*"
106+
ignore_missing_imports = true
107+
108+
[[tool.mypy.overrides]]
109+
module = "pure_eval.*"
110+
ignore_missing_imports = true
111+
112+
[[tool.mypy.overrides]]
113+
module = "blinker.*"
114+
ignore_missing_imports = true
115+
116+
[[tool.mypy.overrides]]
117+
module = "sentry_sdk._queue"
118+
ignore_missing_imports = true
119+
disallow_untyped_defs = false
120+
121+
[[tool.mypy.overrides]]
122+
module = "sentry_sdk._lru_cache"
123+
disallow_untyped_defs = false
124+
125+
[[tool.mypy.overrides]]
126+
module = "celery.app.trace"
127+
ignore_missing_imports = true
128+
129+
[[tool.mypy.overrides]]
130+
module = "flask.signals"
131+
ignore_missing_imports = true
132+
133+
[[tool.mypy.overrides]]
134+
module = "huey.*"
135+
ignore_missing_imports = true
136+
137+
[[tool.mypy.overrides]]
138+
module = "openai.*"
139+
ignore_missing_imports = true
140+
141+
[[tool.mypy.overrides]]
142+
module = "openfeature.*"
143+
ignore_missing_imports = true
144+
145+
[[tool.mypy.overrides]]
146+
module = "huggingface_hub.*"
147+
ignore_missing_imports = true
148+
149+
[[tool.mypy.overrides]]
150+
module = "arq.*"
151+
ignore_missing_imports = true
152+
153+
[[tool.mypy.overrides]]
154+
module = "grpc.*"
155+
ignore_missing_imports = true

0 commit comments

Comments
 (0)