diff --git a/src/versioningit/hatch.py b/src/versioningit/hatch.py index 2e55a28..027bd65 100644 --- a/src/versioningit/hatch.py +++ b/src/versioningit/hatch.py @@ -113,10 +113,7 @@ def initialize(self, _version: str, build_data: dict[str, Any]) -> None: def finalize( self, _version: str, _build_data: dict[str, Any], _artifact_path: str ) -> None: - try: - shutil.rmtree(self.__tmpdir) - except OSError: - pass + shutil.rmtree(self.__tmpdir, ignore_errors=True) @hookimpl