| 1 |
# IMPORTANT |
| 2 |
# Set "ignore_missing_imports" per package below, rather than globally. |
| 3 |
# That will help identify missing type stubs that should be added to the sanity test environment. |
| 4 |
|
| 5 |
[mypy] |
| 6 |
# There are ~20 errors reported in ansible-core when strict optional checking is enabled. |
| 7 |
# Until the number of occurrences are reduced, it's better to disable strict checking. |
| 8 |
strict_optional = False |
| 9 |
# There are ~70 errors reported in ansible-core when checking attributes. |
| 10 |
# Until the number of occurrences are reduced, it's better to disable the check. |
| 11 |
# The safe-super rule is disabled because it reports false positives on methods which return None. |
| 12 |
# The type-abstract code is ignored due to false positives. |
| 13 |
# See: https://github.com/python/mypy/issues/4717 |
| 14 |
disable_error_code = attr-defined,safe-super,type-abstract |
| 15 |
|
| 16 |
mypy_path = ${MYPY_CONFIG_FILE_DIR}/_type_stubs |
| 17 |
|
| 18 |
# Some controller unit tests use ansible_collections imports, both real and test-specific. |
| 19 |
# The real imports are not currently visible to mypy. |
| 20 |
# There's little point in exposing the test-specific imports. |
| 21 |
[mypy-ansible_collections.*] |
| 22 |
ignore_missing_imports = True |
| 23 |
|
| 24 |
# Some unit tests for ansible-test use ansible_test imports, which are not currently visible to mypy. |
| 25 |
[mypy-ansible_test.*] |
| 26 |
ignore_missing_imports = True |
| 27 |
|
| 28 |
[mypy-ansible.galaxy.collection.galaxy_api_proxy] |
| 29 |
strict_optional = True |
| 30 |
|
| 31 |
[mypy-ansible.galaxy.collection.gpg] |
| 32 |
strict_optional = True |
| 33 |
|
| 34 |
[mypy-ansible.galaxy.dependency_resolution.*] |
| 35 |
strict_optional = True |
| 36 |
|
| 37 |
[mypy-ansible.module_utils.six.moves.*] |
| 38 |
ignore_missing_imports = True |
| 39 |
|
| 40 |
[mypy-pkg_resources.*] |
| 41 |
ignore_missing_imports = True |
| 42 |
|
| 43 |
[mypy-coverage.*] |
| 44 |
ignore_missing_imports = True |
| 45 |
|
| 46 |
[mypy-passlib.*] |
| 47 |
ignore_missing_imports = True |
| 48 |
|
| 49 |
[mypy-pexpect.*] |
| 50 |
ignore_missing_imports = True |
| 51 |
|
| 52 |
[mypy-pypsrp.*] |
| 53 |
ignore_missing_imports = True |
| 54 |
|
| 55 |
[mypy-winrm.*] |
| 56 |
ignore_missing_imports = True |
| 57 |
|
| 58 |
[mypy-kerberos.*] |
| 59 |
ignore_missing_imports = True |
| 60 |
|
| 61 |
[mypy-xmltodict.*] |
| 62 |
ignore_missing_imports = True |
| 63 |
|
| 64 |
[mypy-md5.*] |
| 65 |
ignore_missing_imports = True |
| 66 |
|
| 67 |
[mypy-tomli_w.*] |
| 68 |
ignore_missing_imports = True |
| 69 |
|
| 70 |
[mypy-imp.*] |
| 71 |
ignore_missing_imports = True |
| 72 |
|
| 73 |
[mypy-scp.*] |
| 74 |
ignore_missing_imports = True |
| 75 |
|
| 76 |
[mypy-ncclient.*] |
| 77 |
ignore_missing_imports = True |
| 78 |
|
| 79 |
[mypy-lxml.*] |
| 80 |
ignore_missing_imports = True |
| 81 |
|
| 82 |
[mypy-rpmUtils.*] |
| 83 |
ignore_missing_imports = True |
| 84 |
|
| 85 |
[mypy-rpm.*] |
| 86 |
ignore_missing_imports = True |
| 87 |
|
| 88 |
[mypy-psutil.*] |
| 89 |
ignore_missing_imports = True |
| 90 |
|
| 91 |
[mypy-dnf.*] |
| 92 |
ignore_missing_imports = True |
| 93 |
|
| 94 |
[mypy-apt.*] |
| 95 |
ignore_missing_imports = True |
| 96 |
|
| 97 |
[mypy-apt_pkg.*] |
| 98 |
ignore_missing_imports = True |
| 99 |
|
| 100 |
[mypy-gssapi.*] |
| 101 |
ignore_missing_imports = True |
| 102 |
|
| 103 |
[mypy-_ssl.*] |
| 104 |
ignore_missing_imports = True |
| 105 |
|
| 106 |
[mypy-urllib_gssapi.*] |
| 107 |
ignore_missing_imports = True |
| 108 |
|
| 109 |
[mypy-systemd.*] |
| 110 |
ignore_missing_imports = True |
| 111 |
|
| 112 |
[mypy-sha.*] |
| 113 |
ignore_missing_imports = True |
| 114 |
|
| 115 |
[mypy-distro.*] |
| 116 |
ignore_missing_imports = True |
| 117 |
|
| 118 |
[mypy-urlparse.*] |
| 119 |
ignore_missing_imports = True |
| 120 |
|
| 121 |
[mypy-argcomplete.*] |
| 122 |
ignore_missing_imports = True |
| 123 |
|
| 124 |
[mypy-selinux.*] |
| 125 |
ignore_missing_imports = True |
| 126 |
|
| 127 |
[mypy-httplib.*] |
| 128 |
ignore_missing_imports = True |
| 129 |
|
| 130 |
[mypy-compiler.*] |
| 131 |
ignore_missing_imports = True |
| 132 |
|
| 133 |
[mypy-aptsources.*] |
| 134 |
ignore_missing_imports = True |
| 135 |
|
| 136 |
[mypy-urllib3.*] |
| 137 |
ignore_missing_imports = True |
| 138 |
|
| 139 |
[mypy-requests.*] |
| 140 |
ignore_missing_imports = True |
| 141 |
|
| 142 |
[mypy-jinja2.nativetypes] |
| 143 |
ignore_missing_imports = True |
| 144 |
|
| 145 |
[mypy-debugpy] |
| 146 |
ignore_missing_imports = True |