Skip to content

Commit ae5f077

Browse files
committed
Add explicit -> None on __init__
It seems to me like `--disallow-untyped-defs`, enabled in `mypy --strict`, should have flagged this as an error. However, from documentation on `no-untyped-def`, `mypy` only requires `__init__(...) -> None` when there is any argument aside from the first `self`. This patch follows the parenthetical recommendation from PEP 484 that `-> None` be given anyways. References: * https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-disallow-untyped-defs * https://mypy.readthedocs.io/en/stable/error_code_list2.html#check-that-every-function-has-an-annotation-no-untyped-def * https://peps.python.org/pep-0484/#the-meaning-of-annotations Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 40be311 commit ae5f077

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

case_utils/case_validate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(
7272
graph: Any,
7373
text: str,
7474
undefined_concepts: Set[rdflib.URIRef],
75-
):
75+
) -> None:
7676
self.conforms = conforms
7777
self.graph = graph
7878
self.text = text

0 commit comments

Comments
 (0)