mirror of
https://github.com/python/cpython.git
synced 2025-11-09 10:01:42 +00:00
16 lines
367 B
Python
16 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
|
||
|
|
"""
|