Skip to content

Commit

Permalink
Remove workaround for python/typeshed#10328.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 20, 2024
1 parent 2c43cfe commit ebcdcfd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,11 +1108,7 @@ def _get_toplevel_name(name: PackagePath) -> str:
# Defer import of inspect for performance (python/cpython#118761)
import inspect

return _topmost(name) or (
# python/typeshed#10328
inspect.getmodulename(name) # type: ignore
or str(name)
)
return _topmost(name) or (inspect.getmodulename(name) or str(name))


def _top_level_inferred(dist):
Expand Down

0 comments on commit ebcdcfd

Please sign in to comment.