Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 14, 2024
1 parent 883ca9a commit 4180dff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyiron_base/project/archiving/import_archive.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import tarfile
from shutil import copytree, rmtree
import tempfile
from shutil import copytree, rmtree

import numpy as np
import pandas
Expand Down Expand Up @@ -56,7 +56,11 @@ def import_jobs(project_instance, archive_directory, df, compressed=True):
with tempfile.TemporaryDirectory() as temp_dir:
with tarfile.open(archive_directory + ".tar.gz", "r:gz") as tar:
tar.extractall(path=temp_dir)
copytree(os.path.join(temp_dir, common_path), project_instance.path, dirs_exist_ok=True)
copytree(
os.path.join(temp_dir, common_path),
project_instance.path,
dirs_exist_ok=True,
)
else:
src = os.path.abspath(os.path.join(archive_directory, common_path))
copytree(src, project_instance.path, dirs_exist_ok=True)
Expand Down

0 comments on commit 4180dff

Please sign in to comment.