diff --git a/src/installer/_core.py b/src/installer/_core.py index f29dfb81..156164f4 100644 --- a/src/installer/_core.py +++ b/src/installer/_core.py @@ -13,7 +13,7 @@ __all__ = ["install"] -def _process_WHEEL_file(source: WheelSource) -> Scheme: # noqa: N802 +def _process_WHEEL_file(source: WheelSource) -> Scheme: # noqa: N802 """Process the WHEEL file, from ``source``. Returns the scheme that the archive root should go in. diff --git a/src/installer/exceptions.py b/src/installer/exceptions.py index c125d3c7..2d8757c0 100644 --- a/src/installer/exceptions.py +++ b/src/installer/exceptions.py @@ -5,5 +5,5 @@ class InstallerError(Exception): """All exceptions raised from this package's code.""" -class InvalidWheelSource(InstallerError): # noqa: N818 +class InvalidWheelSource(InstallerError): # noqa: N818 """When a wheel source violates a contract, or is not supported.""" diff --git a/src/installer/records.py b/src/installer/records.py index b67ba862..bab94e05 100644 --- a/src/installer/records.py +++ b/src/installer/records.py @@ -16,7 +16,7 @@ ] -class InvalidRecordEntry(Exception): # noqa: N818 +class InvalidRecordEntry(Exception): # noqa: N818 """Raised when a RecordEntry is not valid, due to improper element values or count.""" def __init__( # noqa: D107 diff --git a/src/installer/scripts.py b/src/installer/scripts.py index 7bcb9ec4..9b41f004 100644 --- a/src/installer/scripts.py +++ b/src/installer/scripts.py @@ -86,7 +86,7 @@ def _build_shebang(executable: str, forlauncher: bool) -> bytes: return b"#!/bin/sh\n'''exec' " + quoted + b' "$0" "$@"\n' + b"' '''" -class InvalidScript(ValueError): # noqa: N818 +class InvalidScript(ValueError): # noqa: N818 """Raised if the user provides incorrect script section or kind.""" diff --git a/src/installer/sources.py b/src/installer/sources.py index 4bbd0037..bcc783fb 100644 --- a/src/installer/sources.py +++ b/src/installer/sources.py @@ -121,7 +121,7 @@ def __repr__(self) -> str: return f"WheelFileValidationError(issues={self.issues!r})" -class _WheelFileBadDistInfo(ValueError, InstallerError): # noqa: N818 +class _WheelFileBadDistInfo(ValueError, InstallerError): # noqa: N818 """Raised when a wheel file has issues around `.dist-info`.""" def __init__(self, *, reason: str, filename: Optional[str], dist_info: str) -> None: diff --git a/tests/test_sources.py b/tests/test_sources.py index 685d6e6e..6db761c8 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -66,7 +66,9 @@ def test_rejects_not_okay_name(self, tmp_path): with zipfile.ZipFile(str(path), "w"): pass - with pytest.raises(ValueError, match="Not a valid wheel filename: .+"), WheelFile.open(str(path)): + with pytest.raises( + ValueError, match="Not a valid wheel filename: .+" + ), WheelFile.open(str(path)): pass def test_provides_correct_dist_info_filenames(self, fancy_wheel): @@ -149,7 +151,9 @@ def test_enforces_single_dist_info(self, fancy_wheel): b"This is a random file.", ) - with pytest.raises(InstallerError) as ctx, WheelFile.open(fancy_wheel) as source: + with pytest.raises(InstallerError) as ctx, WheelFile.open( + fancy_wheel + ) as source: _ = source.dist_info_filenames error = ctx.value