Skip to content

Commit beba3ff

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent eaa452c commit beba3ff

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/aiida/cmdline/commands/cmd_archive.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ def inspect(ctx, archive, version, meta_data, database):
140140
'--tmp-dir',
141141
type=click.Path(exists=True, file_okay=False, dir_okay=True, writable=True, path_type=Path),
142142
help='Directory to use for temporary files during archive creation. '
143-
'If not specified, a temporary directory will be created in the same directory as the output file '
144-
'with a \'.aiida-export-\' prefix. This parameter is useful when the output directory has limited '
145-
'space or when you want to use a specific filesystem (e.g., faster storage) for temporary operations. '
146-
'The directory must exist and be writable.',
143+
'If not specified, a temporary directory will be created in the same directory as the output file '
144+
"with a '.aiida-export-' prefix. This parameter is useful when the output directory has limited "
145+
'space or when you want to use a specific filesystem (e.g., faster storage) for temporary operations. '
146+
'The directory must exist and be writable.',
147147
)
148148
@decorators.with_dbenv()
149149
def create(

src/aiida/tools/archive/create.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ def querybuilder():
334334
}
335335
)
336336
# stream entity data to the archive
337-
with get_progress_reporter()(desc='Archiving database: ', total=sum(entity_counts.values())) as progress:
337+
with get_progress_reporter()(
338+
desc='Archiving database: ', total=sum(entity_counts.values())
339+
) as progress:
338340
for etype, ids in entity_ids.items():
339341
if etype == EntityTypes.NODE and strip_checkpoints:
340342

@@ -391,7 +393,9 @@ def transform(d):
391393

392394
# stream node repository files to the archive
393395
if entity_ids[EntityTypes.NODE]:
394-
_stream_repo_files(archive_format.key_format, writer, entity_ids[EntityTypes.NODE], backend, batch_size)
396+
_stream_repo_files(
397+
archive_format.key_format, writer, entity_ids[EntityTypes.NODE], backend, batch_size
398+
)
395399

396400
EXPORT_LOGGER.report('Finalizing archive creation...')
397401

@@ -404,9 +408,9 @@ def transform(d):
404408
if e.errno == 28: # No space left on device
405409
raise ArchiveExportError(
406410
f"Insufficient disk space in temporary directory '{tmp_dir}'. "
407-
f"Consider using --tmp-dir to specify a location with more available space."
411+
f'Consider using --tmp-dir to specify a location with more available space.'
408412
) from e
409-
raise ArchiveExportError(f"Failed to create temporary directory: {e}") from e
413+
raise ArchiveExportError(f'Failed to create temporary directory: {e}') from e
410414

411415
EXPORT_LOGGER.report('Archive created successfully')
412416

0 commit comments

Comments
 (0)