Clean up Error enum in Metadata23 (#2835)

## Summary

Rename, and remove a bunch of unused variants.
This commit is contained in:
Charlie Marsh 2024-04-05 10:40:33 -04:00 committed by GitHub
parent 2f386ef440
commit a0b8d1a994
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 66 deletions

View file

@ -48,7 +48,7 @@ pub enum Error {
metadata: PackageName,
},
#[error("Failed to parse metadata from built wheel")]
Metadata(#[from] pypi_types::Error),
Metadata(#[from] pypi_types::MetadataError),
#[error("Failed to read `dist-info` metadata from built wheel")]
DistInfo(#[from] install_wheel_rs::Error),
#[error("Failed to read zip archive from built wheel")]
@ -62,11 +62,11 @@ pub enum Error {
#[error("The source distribution is missing a `PKG-INFO` file")]
MissingPkgInfo,
#[error("The source distribution does not support static metadata in `PKG-INFO`")]
DynamicPkgInfo(#[source] pypi_types::Error),
DynamicPkgInfo(#[source] pypi_types::MetadataError),
#[error("The source distribution is missing a `pyproject.toml` file")]
MissingPyprojectToml,
#[error("The source distribution does not support static metadata in `pyproject.toml`")]
DynamicPyprojectToml(#[source] pypi_types::Error),
DynamicPyprojectToml(#[source] pypi_types::MetadataError),
#[error("Unsupported scheme in URL: {0}")]
UnsupportedScheme(String),