Skip to content

Commit

Permalink
Stop trying to differentiate between importlib.metadata._adapters.Mes…
Browse files Browse the repository at this point in the history
…sage and email.message.Message.
  • Loading branch information
jaraco committed Sep 11, 2024
1 parent 0783ade commit 4b4b091
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions importlib_metadata/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@ def localize_dist(
return cast(importlib_metadata.Distribution, dist)


if sys.version_info >= (3, 10):
StdlibMessage = importlib.metadata._adapters.Message
else:
StdlibMessage = email.message.Message


def localize_metadata(
input: importlib_metadata._adapters.Message | StdlibMessage,
input: importlib_metadata._adapters.Message | email.message.Message,
) -> importlib_metadata._adapters.Message:
if isinstance(input, importlib_metadata._adapters.Message):
return input
Expand Down

0 comments on commit 4b4b091

Please sign in to comment.