Skip to content

Commit 9e618d4

Browse files
moved mypy settings from mypy.ini to pyproject.toml
1 parent 12769d6 commit 9e618d4

File tree

2 files changed

+42
-39
lines changed

2 files changed

+42
-39
lines changed

py/mypy.ini

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

py/pyproject.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
11
[build-system]
22
requires = ["setuptools", "setuptools-rust"]
33
build-backend = "setuptools.build_meta"
4+
5+
# mypy global options
6+
[tool.mypy]
7+
# The aim in future here is we would be able to turn (most) of these flags on, however the typing technical
8+
# debt is quite colossal right now. For now we should maybe get everything working with the config here
9+
# then look at going after partially or completely untyped defs as a phase-2.
10+
files = selenium
11+
# warn about per-module sections in the config file that do not match any files processed.
12+
warn_unused_configs = True
13+
# disallows subclassing of typing.Any.
14+
disallow_subclassing_any = False
15+
# disallow usage of generic types that do not specify explicit type parameters.
16+
disallow_any_generics = False
17+
# disallow calling functions without type annotations from functions that have type annotations.
18+
disallow_untyped_calls = False
19+
# disallow defining functions without type annotations or with incomplete annotations.
20+
disallow_untyped_defs = False
21+
# disallow defining functions with incomplete type annotations.
22+
disallow_incomplete_defs = False
23+
# type-checks the interior of functions without type annotations.
24+
check_untyped_defs = False
25+
# reports an error whenever a function with type annotations is decorated with a decorator without annotations.
26+
disallow_untyped_decorators = False
27+
# changes the treatment of arguments with a default value of None by not implicitly making their type `typing.Optional`.
28+
no_implicit_optional = False
29+
# warns about casting an expression to it's inferred type.
30+
warn_redundant_casts = True
31+
# warns about unneeded `# type: ignore` comments.
32+
warn_unused_ignores = True
33+
# warns when returning a value with typing.Any from a function with a non typing.Any return type.
34+
warn_return_any = False
35+
# Shows a warning when encountering any code inferred to be unreachable after performing type analysis.
36+
warn_unreachable = False
37+
38+
# mypy module specific options
39+
[[tool.mypy.trio_websocket]]
40+
# suppress error messages about imports that cannot be resolved.
41+
ignore_missing_imports = True
42+
43+
[[tool.mypy._winreg]]
44+
# suppress error messages about imports that cannot be resolved.
45+
ignore_missing_imports = True

0 commit comments

Comments
 (0)