Skip to content

Commit 7c3e9ec

Browse files
authored
Make MyPy even more strict (#200)
no more: can't have mypy errors if you don't add type hints
1 parent c165565 commit 7c3e9ec

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ max-line-length = 120
3838
truethy-bool = true
3939

4040
[tool.mypy]
41-
disable_error_code = ["no-untyped-def", "no-untyped-call"]
41+
disable_error_code = []
4242

4343
[build-system]
4444
requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]

src/mypackage/mymodule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class MyClass: # pylint: disable=too-few-public-methods
88
This is a docstring for the class.
99
"""
1010

11-
def __init__(self):
11+
def __init__(self) -> None:
1212
"""
1313
Initialize for the sake of initializing
1414
"""

unittests/test_myclass.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class TestMyClass:
66
A class with pytest unit tests.
77
"""
88

9-
def test_something(self):
9+
def test_something(self) -> None:
1010
my_class = MyClass()
1111
assert my_class.do_something() == "abc"

0 commit comments

Comments
 (0)