forked from beartype/beartype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.mypy.ini
51 lines (43 loc) · 2.39 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
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2022 Beartype authors.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
# Project-wide mypy configuration, applied to all invocations of the mypy
# static type-checker within this project.
#
# --------------------( SEE ALSO )--------------------
# * https://mypy.readthedocs.io/en/stable/config_file.html
# Official documentation on this file format.
# ....................{ GLOBAL }...................
# The following mypy-specific section specifier is mandatory, despite this
# file's unambiguous basename of ".mypy.ini". One is enraged by bureaucracy!
[mypy]
# Comma-separated string listing the pathnames of all project paths to be
# checked by mypy by default if none are explicitly passed on the command line.
files = beartype/
# To quote mypy's official CLI documentation:
# "By default, imported values to a module are treated as exported and mypy
# allows other modules to import them. This flag changes the behavior to
# not re-export unless the item is imported using from-as or is included
# in __all__. Note this is always treated as enabled for stub files."
# We don't pretend to understand the low-level nuance between those two
# behaviours, but now explicitly enable the latter behaviour to resolve #57.
no_implicit_reexport = True
# Display machine-readable "["- and "]"-bracketed error codes in *ALL*
# mypy-specific error messages. This option is disabled by default, which is
# awful, because these codes are the *ONLY* means of explicitly ignoring
# specific mypy errors with "# type: ignore[{error_code}]" comments littered
# throughout this project's codebase. Type-checked serenity now!
show_error_codes = True
# ....................{ LIB }...................
# Implicitly ignore missing type hints in third-party optional dependencies, an
# automated alternative to literring our codebase with "# type: ignore[import]"
# pragmas on every import from these dependencies. See also:
# https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-type-hints-for-third-party-library
[mypy-importlib.metadata.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
[mypy-pkg_resources.*]
ignore_missing_imports = True