-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.mypy.ini
113 lines (81 loc) · 3.41 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[mypy]
# Show error codes in error messages.
show_error_codes = True
# Arguments with a default value of None are not implicitly Optional.
no_implicit_optional = True
# Prohibit equality checks, identity checks, and container checks between non-overlapping types.
strict_equality = True
# Warns about casting an expression to its inferred type.
warn_redundant_casts = True
# Warns about unneeded # type: ignore comments.
warn_unused_ignores = True
# Warns when mypy configuration contains unknown options
warn_unused_configs = True
# Shows errors for missing return statements on some execution paths.
warn_no_return = True
# Check unannotated functions for type errors
check_untyped_defs = True
# Disallows defining functions without type annotations or with incomplete type annotations.
disallow_untyped_defs = True
# Disallows defining functions with incomplete type annotations.
disallow_incomplete_defs = True
# Disallows calling functions without type annotations from functions with type annotations.
disallow_untyped_calls = True
# Reports an error whenever a function with type annotations is decorated with
# a decorator without annotations.
disallow_untyped_decorators = True
# Shows a warning when returning a value with type Any from a function declared
# with a non-Any return type.
warn_return_any = True
# Shows a warning when encountering any code inferred to be
# unreachable or redundant after performing type analysis.
warn_unreachable = True
# Disallows usage of types that come from unfollowed imports
# (anything imported from an unfollowed import is automatically given a type of Any).
disallow_any_unimported = False
# Disallows all expressions in the module that have type Any.
disallow_any_expr = False
# Disallows functions that have Any in their signature after decorator transformation.
disallow_any_decorated = False
# Disallows explicit Any in type positions such as type annotations and generic type parameters.
disallow_any_explicit = False
# Disallows usage of generic types that do not specify explicit type parameters.
disallow_any_generics = True
# Disallows subclassing a value of type Any.
disallow_subclassing_any = False
# By default, imported values to a module are treated as exported and mypy allows
# other modules to import them. When false, mypy will not re-export unless the item
# is imported using from-as or is included in __all__.
# Note that mypy treats stub files as if this is always disabled.
implicit_reexport = True
# Use an SQLite database to store the cache.
sqlite_cache = False
# Include fine-grained dependency information in the cache for the mypy daemon.
cache_fine_grained = False
# --------------------------------------------------------------------------------------------------
# End of default settings
# --------------------------------------------------------------------------------------------------
exclude = (?x)(
# Python virtual environment
^venv/
| ^build/
| ^docs/
| ^tools/
)
# --------------------
# Additional checks
# --------------------
# Require decorating methods that override parent ones with @override
enable_error_code = explicit-override
[mypy-mistletoe.*]
ignore_missing_imports = True
[mypy-qiskit.*]
ignore_missing_imports = True
[mypy-qiskit_aer.*]
ignore_missing_imports = True
[mypy-qiskit_algorithms.*]
ignore_missing_imports = True
[mypy-qiskit_experiments.*]
ignore_missing_imports = True
[mypy-scipy.*]
ignore_missing_imports = True