From 52fa6b19df221b9f692d00135a0b6bec1a95be89 Mon Sep 17 00:00:00 2001 From: Matthew Cane Date: Fri, 8 Aug 2025 14:09:00 +0100 Subject: [PATCH] Add mypy configuration with stricter overrides for public modules --- pyproject.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 43356be..1d422bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,3 +128,23 @@ addopts = [ "--cov-fail-under=95", "--cov-report=term-missing", ] + +[tool.mypy] +python_version = "3.12" +warn_unused_ignores = true +warn_redundant_casts = true +warn_unreachable = true +no_implicit_optional = true +strict_equality = true +pretty = true +# Default expectations for the codebase; public modules may override to be stricter. +disallow_incomplete_defs = false +disallow_untyped_defs = false + +[[tool.mypy.overrides]] +module = [ + "python_ntfy.client", + "python_ntfy.__init__", +] +disallow_incomplete_defs = true +disallow_untyped_defs = true