Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
Co-authored-by: trag1c <trag1cdev@yahoo.com>
  • Loading branch information
bswck and trag1c committed Mar 15, 2024
1 parent d8004ed commit 8a99462
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime_generics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def type_check(subtype: Any, cls: Any) -> bool:
cls = get_alias(cls)

for mro_entry in get_mro(subtype):
if mro_entry.__origin__ == cls.__origin__:
if mro_entry.__origin__ is cls.__origin__:
mro_entry_parametrization = get_parametrization(mro_entry)
cls_parametrization = get_parametrization(cls)
sig = _get_generic_signature(cls)
Expand All @@ -748,6 +748,7 @@ def type_check(subtype: Any, cls: Any) -> bool:
cls_args,
),
):
return False
return True
break
else:
return True
return False

0 comments on commit 8a99462

Please sign in to comment.