From 10eccd360cf5d3730f272e7367fd09c47bbd5744 Mon Sep 17 00:00:00 2001 From: Fuxino Date: Wed, 14 Oct 2026 08:39:46 +0200 Subject: [PATCH] Add mypy configuration Check both the package and the tests by default, require type hints on all functions and ignore the missing stubs for paramiko, systemd and dbus. --- pyproject.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b99d9cf..24f0daa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,16 @@ packages = ["simple_backup"] [tool.setuptools.dynamic] version = { attr = "simple_backup.__version__" } +[tool.mypy] +files = ["simple_backup", "tests"] +disallow_untyped_defs = true +warn_unused_ignores = true + +# No usable stubs (types-paramiko lags behind paramiko 5) +[[tool.mypy.overrides]] +module = ["paramiko", "systemd", "dbus"] +ignore_missing_imports = true + [tool.pytest.ini_options] testpaths = ["tests"] # Import the repo copy, not an installed one