Skip to content

Commit d7a01e1

Browse files
author
Turanyi
committed
Move track_progress imports to top of file
1 parent da0cea6 commit d7a01e1

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

janus_core/helpers/utils.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
from ase import Atoms
1212
from ase.io import read, write
1313
from ase.io.formats import filetype
14+
from rich.progress import (
15+
BarColumn,
16+
MofNCompleteColumn,
17+
Progress,
18+
TextColumn,
19+
TimeRemainingColumn,
20+
)
21+
from rich.style import Style
1422
from spglib import get_spacegroup
1523

1624
from janus_core.helpers.janus_types import (
@@ -691,20 +699,11 @@ def track_progress(sequence: Union[Sequence, Iterable], description: str) -> Ite
691699
description : str
692700
The text to display to the left of the progress bar.
693701
694-
Returns
695-
-------
702+
Yields
703+
------
696704
Iterable
697705
An iterable of the values in the sequence.
698706
"""
699-
from rich.progress import (
700-
BarColumn,
701-
MofNCompleteColumn,
702-
Progress,
703-
TextColumn,
704-
TimeRemainingColumn,
705-
)
706-
from rich.style import Style
707-
708707
text_column = TextColumn("{task.description}")
709708
bar_column = BarColumn(
710709
bar_width=None,

0 commit comments

Comments
 (0)