-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mypy.ini
66 lines (53 loc) 路 1.5 KB
/
.mypy.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Reference:
# https://github.com/openai/openai-python/blob/main/mypy.ini
# https://github.com/pytorch/pytorch/blob/main/mypy.ini
[mypy]
pretty=True
show_error_codes=True
python_version=3.9
exclude = ^omnivault/dsa/queue/.*$
strict_equality=True
implicit_reexport=True
check_untyped_defs=True
no_implicit_optional=True
warn_return_any=True
warn_unreachable=True
warn_unused_configs=True
# Turn these options off as it could cause conflicts with the Pyright options.
warn_unused_ignores=False
warn_redundant_casts=False
disallow_any_generics=True
disallow_untyped_defs=True
disallow_untyped_calls=False
disallow_subclassing_any=True
disallow_incomplete_defs=True
disallow_untyped_decorators=True
cache_fine_grained=True
# By default, mypy reports an error if you assign a value to the result
# of a function call that doesn't return anything. We do this in our test
# cases:
# ```
# result = ...
# assert result is None
# ```
# Changing this codegen to make mypy happy would increase complexity
# and would not be worth it.
disable_error_code=func-returns-value
# https://github.com/python/mypy/issues/12162
[mypy.overrides]
module="black.files.*"
ignore_errors=true
ignore_missing_imports=true
# Third party dependencies that don't have types.
[mypy-matplotlib.*]
ignore_missing_imports=True
[mypy-mpl_toolkits.*]
ignore_missing_imports=True
[mypy-seaborn.*]
ignore_missing_imports=True
[mypy-sklearn.*]
ignore_missing_imports=True
[mypy-transformers.*]
ignore_missing_imports=True
[mypy-datasets.*]
ignore_missing_imports=True