From 74ddb547721735c090cd08f03351c205df808f6e Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Wed, 25 Nov 2026 14:46:02 +0100 Subject: [PATCH] Move the `mypy` config --- pyproject.toml | 44 ++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 48 ------------------------------------------------ 2 files changed, 44 insertions(+), 48 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 008f183..04a3f36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -108,6 +108,50 @@ source = ["velofy"] +[tool.mypy] +# Source: https://mypy.readthedocs.io/en/stable/config_file.html + +cache_dir = ".cache/mypy" + +# Check the interior of functions without type annotations +check_untyped_defs = true + +# Disallow generic types without explicit type parameters +disallow_any_generics = true + +# Disallow functions with incomplete type annotations +disallow_incomplete_defs = true + +# Disallow calling functions without type annotations +disallow_untyped_calls = true + +# Disallow functions without type annotations (or incomplete annotations) +disallow_untyped_defs = true + + +[[tool.mypy.overrides]] + +module = [ + "folium.*", + "geopy.*", + "googlemaps.*", + "matplotlib.*", + "nox.*", + "numpy.*", + "ordered_set.*", + "packaging", + "pandas", + "pytest", + "rpy2.*", + "sqlalchemy.*", + "statsmodels.*", + "utm.*", +] + +ignore_missing_imports = true + + + [tool.poetry.group.dev.dependencies] # Task Runners diff --git a/setup.cfg b/setup.cfg index b48a844..8260e8a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -253,51 +253,3 @@ use_parentheses = true # Source: https://google.github.io/styleguide/pyguide.html#313-imports-formatting force_single_line = true single_line_exclusions = typing - - -[mypy] -cache_dir = .cache/mypy - -# Check the interior of functions without type annotations. -check_untyped_defs = true - -# Disallow generic types without explicit type parameters. -disallow_any_generics = true - -# Disallow functions with incomplete type annotations. -disallow_incomplete_defs = true - -# Disallow calling functions without type annotations. -disallow_untyped_calls = true - -# Disallow functions without type annotations (or incomplete annotations). -disallow_untyped_defs = true - -[mypy-folium.*] -ignore_missing_imports = true -[mypy-geopy.*] -ignore_missing_imports = true -[mypy-googlemaps.*] -ignore_missing_imports = true -[mypy-matplotlib.*] -ignore_missing_imports = true -[mypy-nox.*] -ignore_missing_imports = true -[mypy-numpy.*] -ignore_missing_imports = true -[mypy-ordered_set.*] -ignore_missing_imports = true -[mypy-packaging] -ignore_missing_imports = true -[mypy-pandas] -ignore_missing_imports = true -[mypy-pytest] -ignore_missing_imports = true -[mypy-rpy2.*] -ignore_missing_imports = true -[mypy-sqlalchemy.*] -ignore_missing_imports = true -[mypy-statsmodels.*] -ignore_missing_imports = true -[mypy-utm.*] -ignore_missing_imports = true