From 80b00bcdd63620768e98879a1122f4a7f51faaa8 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 9 Oct 2023 02:51:04 -0400 Subject: [PATCH] fix linting --- src/packaging/metadata.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/packaging/metadata.py b/src/packaging/metadata.py index b4ac3066..0abd8b41 100644 --- a/src/packaging/metadata.py +++ b/src/packaging/metadata.py @@ -44,7 +44,7 @@ def __init_subclass__(*_args, **_kwargs): ExceptionGroup except NameError: # pragma: no cover - class ExceptionGroup(Exception): # type: ignore[no-redef] # noqa: N818 + class ExceptionGroup(Exception): """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11. If :external:exc:`ExceptionGroup` is already defined by Python itself, @@ -680,7 +680,7 @@ def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> "Metadata": ins._raw = data.copy() # Mutations occur due to caching enriched values. if validate: - exceptions: List[InvalidMetadata] = [] + exceptions: List[Exception] = [] try: metadata_version = ins.metadata_version metadata_age = _VALID_METADATA_VERSIONS.index(metadata_version) @@ -738,7 +738,7 @@ def from_email( raw, unparsed = parse_email(data) if validate: - exceptions: list[InvalidMetadata] = [] + exceptions: list[Exception] = [] for unparsed_key in unparsed: if unparsed_key in _EMAIL_TO_RAW_MAPPING: message = f"{unparsed_key!r} has invalid data"