[docs]classArchiveTypeError(Exception):"""Raised when the supplied archive is not of a supported type."""archive:Pathsupported_suffix:Sequence[str]
[docs]def__init__(self,archive:Path,supported_suffix:Sequence[str])->None:"""Instantiate class."""self.archive=archiveself.supported_suffix=supported_suffixarchive_suffix="".join(archive.suffixes)joined_suffix=", ".join(supported_suffix)super().__init__(f"archive {archive.name} ({archive_suffix}) doesn't have "f"a suffix supported by this extractor ({joined_suffix})")
[docs]classPep706Error(Exception):"""Raised when the current version of Python contains a security vulnerability."""
[docs]def__init__(self)->None:"""Instantiate class."""super().__init__("Current version of Python contains the security vulnerability discussed in PEP 706. ""Update to a version of Python containing the discussed security update.")