Skip to content

Commit

Permalink
Revert "Filter out parameterized types. Fixes #2."
Browse files Browse the repository at this point in the history
This reverts commit e34c923, no longer needed on supported Pythons.
  • Loading branch information
jaraco committed Aug 28, 2023
1 parent 9d15d16 commit 55e3c63
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions singledispatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def is_strict_base(typ):
mro = []
for typ in types:
found = []
for sub in filter(_safe, typ.__subclasses__()):
for sub in typ.__subclasses__():
if sub not in bases and issubclass(cls, sub):
found.append([s for s in sub.__mro__ if s in type_set])
if not found:
Expand All @@ -132,13 +132,6 @@ def is_strict_base(typ):
return _c3_mro(cls, abcs=mro)


def _safe(class_):
"""
Return if the class is safe for testing as subclass. Ref #2.
"""
return not getattr(class_, '__origin__', None)


def _find_impl(cls, registry):
"""Returns the best matching implementation from *registry* for type *cls*.
Expand Down

0 comments on commit 55e3c63

Please sign in to comment.