Skip to content

Commit

Permalink
Make MyPy even more strict (#200)
Browse files Browse the repository at this point in the history
no more: can't have mypy errors if you don't add type hints
  • Loading branch information
hf-kklein authored May 27, 2024
1 parent c165565 commit 7c3e9ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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"]
Expand Down
2 changes: 1 addition & 1 deletion src/mypackage/mymodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
2 changes: 1 addition & 1 deletion unittests/test_myclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 7c3e9ec

Please sign in to comment.