From e330c031bdbfc2a724fa4da69adc78d748b31502 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Fri, 12 Jan 2024 21:49:10 +0000 Subject: [PATCH] Tighten typing annotations --- setup.cfg | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 76f17f4..b28e778 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,6 +55,16 @@ addopts = --strict python_files = test_*.py testpaths = TEMPLATE/tests +[coverage:report] +show_missing = true +exclude_lines = + pragma: nocover + pragma: no cover + TYPE_CHECKING + except ImportError + @overload + @(abc\.)?abstractmethod + [flake8] # https://github.com/python/black#line-length max-line-length = 88 @@ -76,6 +86,16 @@ force_grid_wrap = 0 use_parentheses = True line_length = 88 -# mypy: Ignore non-typed libraries -[mypy-*] -ignore_missing_imports = True +[mypy] +allow_incomplete_defs = false +allow_untyped_decorators = false +allow_untyped_defs = false +ignore_missing_imports = true +no_implicit_optional = true +show_error_codes = true +warn_redundant_casts = true +warn_unused_ignores = true +warn_unreachable = true + +[mypy-*.tests.*] +allow_untyped_defs = true