From 1a806f8923debd74b8ece818bbf331f176739571 Mon Sep 17 00:00:00 2001 From: Kristian Thy Date: Mon, 11 Apr 2022 23:31:40 +0200 Subject: [PATCH] fix: move mypy config to pyproject file Fixes #1. --- README.md | 3 --- pyproject.toml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b7aed02..518881f 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,6 @@ modify the copyright blurb in the source files. ## 👷 2: TODO -* [[#1](https://github.com/pyxy-dk/python-project-template/issues/1)] - Move [mypy] configuration into `pyproject.toml` - [once the functionality has stabilised](https://github.com/python/mypy/issues/5205#issuecomment-832779057). * [[#2](https://github.com/pyxy-dk/python-project-template/issues/2)] Ensure [pipx](https://pipxproject.github.io/pipx/) compatibility by setting up [flit entrypoints](https://flit.readthedocs.io/en/latest/pyproject_toml.html#scripts-section). diff --git a/pyproject.toml b/pyproject.toml index 54963ae..ae0a6d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,6 +67,21 @@ use_parentheses = true line_length = 99 py_version = 37 +[tool.mypy] +plugins = [ + "numpy.typing.mypy_plugin", +] +python_version = "3.7" +warn_return_any = true +warn_unused_configs = true + +[[tool.mypy.overrides]] +module = [ + "pandapower.*", + "psycopg2", +] +ignore_missing_imports = true + [tool.pytest.ini_options] minversion = "7.0" filterwarnings = "error::UserWarning"