Fix Python formatting (Black) (#453)

This commit is contained in:
Graeme Nail 2023-07-31 15:27:24 +01:00 committed by GitHub
parent e333208cb9
commit becb6e2cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -139,7 +139,6 @@ class TranslateLocallyLike(Repository):
with tarfile.open(save_location) as model_archive: with tarfile.open(save_location) as model_archive:
def is_within_directory(directory, target): def is_within_directory(directory, target):
abs_directory = os.path.abspath(directory) abs_directory = os.path.abspath(directory)
abs_target = os.path.abspath(target) abs_target = os.path.abspath(target)
@ -148,7 +147,6 @@ class TranslateLocallyLike(Repository):
return prefix == abs_directory return prefix == abs_directory
def safe_extract(tar, path=".", members=None, *, numeric_owner=False): def safe_extract(tar, path=".", members=None, *, numeric_owner=False):
for member in tar.getmembers(): for member in tar.getmembers():
member_path = os.path.join(path, member.name) member_path = os.path.join(path, member.name)
if not is_within_directory(path, member_path): if not is_within_directory(path, member_path):

View File

@ -16,6 +16,7 @@ PLAT_TO_CMAKE = {
"win-arm64": "ARM64", "win-arm64": "ARM64",
} }
# A CMakeExtension needs a sourcedir instead of a file list. # A CMakeExtension needs a sourcedir instead of a file list.
# The name must be the _single_ output extension from the CMake build. # The name must be the _single_ output extension from the CMake build.
# If you need multiple extensions, see scikit-build. # If you need multiple extensions, see scikit-build.
@ -84,7 +85,6 @@ class CMakeBuild(build_ext):
pass pass
else: else:
# Single config generators are handled "normally" # Single config generators are handled "normally"
single_config = any(x in cmake_generator for x in {"NMake", "Ninja"}) single_config = any(x in cmake_generator for x in {"NMake", "Ninja"})