chia-blockchain/mypy.ini.template
dustinface ec5f85dfc4
mypy: Build mypy.ini config with exclusions dynamically (#15158)
* mypy: Build `mypy.ini` config with exclusions dynamically

* Apply suggestions from code review

* Revert suggested `check=True` because `mypy` is expected to fails here

* Only `read_text` once

* Fix exception message

* Don't `touch`

* More `joinpath`

* Revert `newline="\n"`, its python 3.10 only

See https://bugs.python.org/issue23706

* Apply suggestions

* Fail if new issues get introduced

* Print the newly introduces issues

* Handle error codes

* Add `write_file`

* Use `sys.executable`

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* `mypy_failures[:-1]`

* Add an example comment

* Improve failure check

* Drop exclusions after rebase

* Drop one more exclusion after another rebase

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-05-22 16:50:13 -05:00

33 lines
879 B
Plaintext

[mypy]
files = benchmarks,build_scripts,chia,tests,tools,*.py
ignore_missing_imports = True
show_error_codes = True
warn_unused_ignores = True
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_return_any = True
no_implicit_reexport = True
strict_equality = True
warn_redundant_casts = True
[mypy-chia-exclusions]
disable_error_code = annotation-unchecked
disallow_any_generics = False
disallow_subclassing_any = False
disallow_untyped_calls = False
disallow_untyped_defs = False
disallow_incomplete_defs = False
check_untyped_defs = False
disallow_untyped_decorators = False
no_implicit_optional = False
warn_return_any = False
no_implicit_reexport = False
strict_equality = False