diff --git a/pyproject.toml b/pyproject.toml index 5a0bab4..d2999b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,9 +68,13 @@ source = [ show_missing = true [tool.mypy] +enable_error_code = [ + "ignore-without-code", + "redundant-expr", + "truthy-bool", +] mypy_path = "src/" namespace_packages = false -show_error_codes = true strict = true warn_unreachable = true diff --git a/src/blacken_docs/__init__.py b/src/blacken_docs/__init__.py index 6847e79..484b73b 100644 --- a/src/blacken_docs/__init__.py +++ b/src/blacken_docs/__init__.py @@ -172,7 +172,7 @@ def finish_fragment() -> None: code += f"{PYCON_CONTINUATION_PREFIX}\n" fragment = None - indentation = None + indentation: int | None = None for line in match["code"].splitlines(): orig_line, line = line, line.lstrip() if indentation is None and line: