From 64476ee6f1d72cb7fcabdff32b02007e01e5c815 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2024 14:24:05 -0400 Subject: [PATCH] Rename 'localize.metadata' to 'localize.message'. --- importlib_metadata/__init__.py | 2 +- importlib_metadata/_compat/localize.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index 9a673358..c35fe108 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -477,7 +477,7 @@ def _discover_resolvers(): return filter(None, declared) @property - @apply(localize.metadata) + @apply(localize.message) def metadata(self) -> _meta.PackageMetadata: """Return the parsed metadata for this Distribution. diff --git a/importlib_metadata/_compat/localize.py b/importlib_metadata/_compat/localize.py index 9062ff01..d90da1a3 100644 --- a/importlib_metadata/_compat/localize.py +++ b/importlib_metadata/_compat/localize.py @@ -27,7 +27,7 @@ def dist( return cast(importlib_metadata.Distribution, dist) -def metadata( +def message( input: importlib_metadata._adapters.Message | email.message.Message, ) -> importlib_metadata._adapters.Message: if isinstance(input, importlib_metadata._adapters.Message):