Skip to content

Commit

Permalink
fixup: try to fix NotRequired, Required, TypeGuard
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Apr 20, 2024
1 parent 51c719c commit 1856443
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin/core/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
TypeGuard, # noqa: F401
)
else:
_T = TypeVar("_T")

class StrEnum(Type): # type: ignore
pass

class NotRequired(Type): # type: ignore
class NotRequired(Type, Generic[_T]): # type: ignore
pass

class ParamSpec(Type): # type: ignore
Expand All @@ -50,8 +51,8 @@ class ParamSpec(Type): # type: ignore
def __init__(*args, **kwargs) -> None: # type: ignore
pass

class Required(Type): # type: ignore
class Required(Type, Generic[_T]): # type: ignore
pass

class TypeGuard(Type): # type: ignore
class TypeGuard(Type, Generic[_T]): # type: ignore
pass

0 comments on commit 1856443

Please sign in to comment.