pytorch

Форк
0
/
mypy-strict.ini 
65 строк · 1.6 Кб
1
# This is the PyTorch mypy-strict.ini file (note: don't change this line! -
2
# test_run_mypy in test/test_type_hints.py uses this string)
3

4
# Unlike mypy.ini, it enforces very strict typing rules. The intention is for
5
# this config file to be used to ENFORCE that people are using mypy on codegen
6
# files.
7

8
[mypy]
9
python_version = 3.8
10
plugins = mypy_plugins/check_mypy_version.py, numpy.typing.mypy_plugin
11

12
cache_dir = .mypy_cache/strict
13
allow_redefinition = True
14
strict_optional = True
15
show_error_codes = True
16
show_column_numbers = True
17
warn_no_return = True
18
disallow_any_unimported = True
19

20
strict = True
21
implicit_reexport = False
22

23
# do not reenable this:
24
# https://github.com/pytorch/pytorch/pull/60006#issuecomment-866130657
25
warn_unused_ignores = False
26

27
files =
28
    .github,
29
    benchmarks/instruction_counts,
30
    tools,
31
    torch/profiler/_memory_profiler.py,
32
    torch/utils/_pytree.py,
33
    torch/utils/_cxx_pytree.py,
34
    torch/utils/benchmark/utils/common.py,
35
    torch/utils/benchmark/utils/timer.py,
36
    torch/utils/benchmark/utils/valgrind_wrapper
37

38
# Specifically enable imports of benchmark utils. As more of `torch` becomes
39
# strict compliant, those modules can be enabled as well.
40
[mypy-torch.utils.benchmark.utils.*]
41
follow_imports = normal
42

43
# Don't follow imports as much of `torch` is not strict compliant.
44
[mypy-torch]
45
follow_imports = skip
46

47
[mypy-torch.*]
48
follow_imports = skip
49

50
# Missing stubs.
51

52
[mypy-numpy]
53
ignore_missing_imports = True
54

55
[mypy-sympy]
56
ignore_missing_imports = True
57

58
[mypy-sympy.*]
59
ignore_missing_imports = True
60

61
[mypy-mypy.*]
62
ignore_missing_imports = True
63

64
[mypy-usort.*]
65
ignore_missing_imports = True
66

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.