Skip to content

Commit

Permalink
nevermind on downgrade of flake8 - no need to support 3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jul 24, 2024
1 parent fd3350f commit 88ce7d8
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 142 deletions.
8 changes: 4 additions & 4 deletions dcicutils/progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def moveto(self, n):

# Nevermind the above; found a more pointed solution from here:
# https://stackoverflow.com/questions/41707229/why-is-tqdm-printing-to-a-newline-instead-of-updating-the-same-line
# Why in the world would tqdm be maintaining state across instances?? Whatever, this (the clear) fixes it.
# Why in the world would tqdm be maintaining state across instances?? Whatever, this fixes it.
def __init__(self, *args, **kwargs):
super()._instances.clear() if super()._instances else None
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -273,9 +273,9 @@ def set_interrupt_handler(interrupt_handler: Callable) -> Optional[Callable]: #
return namedtuple("interrupt_handler", ["restore"])(restore_interrupt_handler)

def _define_tidy_output_hack(self) -> None:
# Some minor tqdm output tidying-up to account for annoying anomalies; e.g. tqdm
# forces a colon (:) before the percentage like ": 25%|"; and while we're at it
# do a little ASCII progress animation, requiring a special [progress] sentinal
# Some minor tqdm output tidying-up which for annoying anomalies; tqdm forces
# a colon (:) before the percentage, e.g. ": 25%|"; and while we're at it do
# a little ASCII progress animation, requiring a special ([progress]) sentinal
# string in the display string where the progress bar should actually go,
# which we do in _format_description. Other minor things too; see below.
sys_stdout_write = sys.stdout.write
Expand Down
Loading

0 comments on commit 88ce7d8

Please sign in to comment.