@@ -19,3 +19,45 @@ markers = [
1919]
2020python_files = [" test_*.py" , " *_test.py" ]
2121testpaths = [" test" ]
22+
23+ # mypy global options
24+ [tool .mypy ]
25+ # The aim in future here is we would be able to turn (most) of these flags on, however the typing technical
26+ # debt is quite colossal right now. For now we should maybe get everything working with the config here
27+ # then look at going after partially or completely untyped defs as a phase-2.
28+ files = " selenium"
29+ # warn about per-module sections in the config file that do not match any files processed.
30+ warn_unused_configs = true
31+ # disallows subclassing of typing.Any.
32+ disallow_subclassing_any = false
33+ # disallow usage of generic types that do not specify explicit type parameters.
34+ disallow_any_generics = false
35+ # disallow calling functions without type annotations from functions that have type annotations.
36+ disallow_untyped_calls = false
37+ # disallow defining functions without type annotations or with incomplete annotations.
38+ disallow_untyped_defs = false
39+ # disallow defining functions with incomplete type annotations.
40+ disallow_incomplete_defs = false
41+ # type-checks the interior of functions without type annotations.
42+ check_untyped_defs = false
43+ # reports an error whenever a function with type annotations is decorated with a decorator without annotations.
44+ disallow_untyped_decorators = false
45+ # changes the treatment of arguments with a default value of None by not implicitly making their type `typing.Optional`.
46+ no_implicit_optional = false
47+ # warns about casting an expression to it's inferred type.
48+ warn_redundant_casts = true
49+ # warns about unneeded `# type: ignore` comments.
50+ warn_unused_ignores = true
51+ # warns when returning a value with typing.Any from a function with a non typing.Any return type.
52+ warn_return_any = false
53+ # Shows a warning when encountering any code inferred to be unreachable after performing type analysis.
54+ warn_unreachable = false
55+
56+ # mypy module specific options
57+ [[tool .mypy .trio_websocket ]]
58+ # suppress error messages about imports that cannot be resolved.
59+ ignore_missing_imports = true
60+
61+ [[tool .mypy ._winreg ]]
62+ # suppress error messages about imports that cannot be resolved.
63+ ignore_missing_imports = true
0 commit comments