mirror of
https://github.com/python/cpython.git
synced 2025-11-09 01:51:26 +00:00
15 lines
367 B
Python
15 lines
367 B
Python
import functools
|
|
import typing
|
|
|
|
from ._meta import PackageMetadata
|
|
|
|
md_none = functools.partial(typing.cast, PackageMetadata)
|
|
"""
|
|
Suppress type errors for optional metadata.
|
|
|
|
Although Distribution.metadata can return None when metadata is corrupt
|
|
and thus None, allow callers to assume it's not None and crash if
|
|
that's the case.
|
|
|
|
# python/importlib_metadata#493
|
|
"""
|