Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing: ignore mypy runtime error #2

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion stgpytools/types/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from inspect import isclass
from typing import (
TYPE_CHECKING, Any, Callable, Concatenate, Generator, Generic, Iterable, Iterator, Mapping, NoReturn, Protocol,
Sequence, TypeVar, cast, overload
Sequence, TypeVar, cast, overload, no_type_check
)

from .builtins import F0, F1, P0, P1, R0, R1, T0, T1, T2, KwargsT, P, R, T
Expand Down Expand Up @@ -426,6 +426,7 @@ def __setattr__(self, key: str, value: Any) -> None:

return super(classproperty.metaclass, self).__setattr__(key, value)

@no_type_check
def __init__(
self,
fget: classmethod[T, P, R] | Callable[P, R],
Expand All @@ -452,6 +453,7 @@ def getter(self, __fget: classmethod[T, P, R] | Callable[P1, R1]) -> classproper
self.fget = self._wrap(__fget) # type: ignore
return self # type: ignore

@no_type_check
def setter(self, __fset: classmethod[T1, P, None] | Callable[[T1, T2], None]) -> classproperty[P, R, T1, T2, P0]:
self.fset = self._wrap(__fset) # type: ignore
return self # type: ignore
Expand Down
Loading