mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-10-03 16:38:26 +03:00
Fix Python formatting (Black) (#453)
This commit is contained in:
parent
e333208cb9
commit
becb6e2cda
@ -139,7 +139,6 @@ class TranslateLocallyLike(Repository):
|
||||
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 @@ class TranslateLocallyLike(Repository):
|
||||
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):
|
||||
|
2
setup.py
2
setup.py
@ -16,6 +16,7 @@ PLAT_TO_CMAKE = {
|
||||
"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 @@ class CMakeBuild(build_ext):
|
||||
pass
|
||||
|
||||
else:
|
||||
|
||||
# Single config generators are handled "normally"
|
||||
single_config = any(x in cmake_generator for x in {"NMake", "Ninja"})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user