From cad7c3e259da08e9fedeeace50e8700b5be70374 Mon Sep 17 00:00:00 2001 From: konstantin Date: Mon, 7 Oct 2024 13:16:48 +0200 Subject: [PATCH] fix: don't ignore untyped calls in mypy (#63) Co-authored-by: Konstantin --- pyproject.toml | 2 +- src/ebd_toolchain/main.py | 2 +- src/ebd_toolchain/mymodule.py | 2 +- unittests/test_myclass.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 715771f..244855f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ max-line-length = 120 truethy-bool = true [tool.mypy] -disable_error_code = ["no-untyped-def", "no-untyped-call"] +disable_error_code = [] [build-system] requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"] diff --git a/src/ebd_toolchain/main.py b/src/ebd_toolchain/main.py index bc5d675..f9c4773 100644 --- a/src/ebd_toolchain/main.py +++ b/src/ebd_toolchain/main.py @@ -84,7 +84,7 @@ def _dump_json(json_path: Path, ebd_table: EbdTable) -> None: help="Choose which file you'd like to create", ) # pylint:disable=too-many-locals, too-many-branches, too-many-statements, -def main(input_path: Path, output_path: Path, export_types: list[Literal["puml", "dot", "json", "svg"]]): +def main(input_path: Path, output_path: Path, export_types: list[Literal["puml", "dot", "json", "svg"]]) -> None: """ A program to get a machine-readable version of the AHBs docx files published by edi@energy. """ diff --git a/src/ebd_toolchain/mymodule.py b/src/ebd_toolchain/mymodule.py index bfdf96f..17123b1 100644 --- a/src/ebd_toolchain/mymodule.py +++ b/src/ebd_toolchain/mymodule.py @@ -8,7 +8,7 @@ class MyClass: # pylint: disable=too-few-public-methods This is a docstring for the class. """ - def __init__(self): + def __init__(self) -> None: """ Initialize for the sake of initializing """ diff --git a/unittests/test_myclass.py b/unittests/test_myclass.py index 3f7c2e8..9c0432b 100644 --- a/unittests/test_myclass.py +++ b/unittests/test_myclass.py @@ -6,6 +6,6 @@ class TestMyClass: A class with pytest unit tests. """ - def test_something(self): + def test_something(self) -> None: my_class = MyClass() assert my_class.do_something() == "abc"