From becb6e2cda6b76ac66fe5396de04ded3e20c3503 Mon Sep 17 00:00:00 2001 From: Graeme Nail Date: Mon, 31 Jul 2023 15:27:24 +0100 Subject: [PATCH] Fix Python formatting (Black) (#453) --- bindings/python/repository.py | 2 -- setup.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bindings/python/repository.py b/bindings/python/repository.py index 323b4482b..9667c7242 100644 --- a/bindings/python/repository.py +++ b/bindings/python/repository.py @@ -139,7 +139,6 @@ def download(self, model_identifier: str): with tarfile.open(save_location) as model_archive: def is_within_directory(directory, target): - abs_directory = os.path.abspath(directory) abs_target = os.path.abspath(target) @@ -148,7 +147,6 @@ def is_within_directory(directory, target): return prefix == abs_directory def safe_extract(tar, path=".", members=None, *, numeric_owner=False): - for member in tar.getmembers(): member_path = os.path.join(path, member.name) if not is_within_directory(path, member_path): diff --git a/setup.py b/setup.py index 51161a3c0..ed4c6dc81 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ "win-arm64": "ARM64", } + # A CMakeExtension needs a sourcedir instead of a file list. # The name must be the _single_ output extension from the CMake build. # If you need multiple extensions, see scikit-build. @@ -84,7 +85,6 @@ def build_extension(self, ext): pass else: - # Single config generators are handled "normally" single_config = any(x in cmake_generator for x in {"NMake", "Ninja"})