diff --git a/pyproject.toml b/pyproject.toml index 31697e1..7e0a706 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -112,12 +112,6 @@ exclude = [ "libs", ] -# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now. -# Valid values: "error", "warning", "information", "none" -reportInvalidTypeForm = "none" -reportMissingParameterType = "none" -reportUnknownArgumentType = "none" -reportUnknownParameterType = "none" # These "unnecessary isinstance" checks often enhance readability or increase the future-proofness of the code, # since you can then explicitly "raise" for other types. So we don't want to complain about them. reportUnnecessaryIsInstance = "none" diff --git a/scripts/expr_mixin_generator.py b/scripts/expr_mixin_generator.py index 45b7c8e..1911ebb 100644 --- a/scripts/expr_mixin_generator.py +++ b/scripts/expr_mixin_generator.py @@ -52,7 +52,7 @@ ] -def create_overload_bin(op, lhs=None, rhs=None): +def create_overload_bin(op: str, lhs: int | bool | float | None = None, rhs: int | bool | float | None = None): if lhs is None and rhs is None: print(" @t.overload") print(f" def {op}(self, other: t.Any) -> BinExpr[t.Any]: ...") @@ -68,7 +68,7 @@ def create_overload_bin(op, lhs=None, rhs=None): except AttributeError: pass -def create_overload_uni(op, obj=None): +def create_overload_uni(op: str, obj: int | bool | float | None = None): if obj is None: print(" @t.overload") print(f" def {op}(self) -> UniExpr[t.Any]: ...")