[3.13] gh-116608: Apply style and compatibility changes from importlib_resources. (GH-123028) (#123051)

gh-116608: Apply style and compatibility changes from importlib_metadata. (GH-123028)
(cherry picked from commit e913d2c87f)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
This commit is contained in:
Miss Islington (bot) 2024-08-15 21:57:07 +02:00 committed by GitHub
parent 009f9efe65
commit 5ac14eeea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 50 additions and 36 deletions

View file

@ -57,11 +57,7 @@ def contents(anchor, *path_names):
DeprecationWarning,
stacklevel=1,
)
return (
resource.name
for resource
in _get_resource(anchor, path_names).iterdir()
)
return (resource.name for resource in _get_resource(anchor, path_names).iterdir())
def _get_encoding_arg(path_names, encoding):