dcicutils 8.8.3.1b2__py3-none-any.whl → 8.8.3.1b4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dcicutils/progress_bar.py CHANGED
@@ -211,7 +211,6 @@ class ProgressBar:
211
211
  def handle_interrupt(signum: int, frame: frame) -> None: # noqa
212
212
  nonlocal self
213
213
  def handle_secondary_interrupt(signum: int, frame: frame) -> None: # noqa
214
- nonlocal self
215
214
  print("\nEnter 'yes' or 'no' or CTRL-\\ to completely abort ...")
216
215
  self.disable()
217
216
  self._interrupt(self) if self._interrupt else None
@@ -260,8 +259,10 @@ class ProgressBar:
260
259
  # string in the display string where the progress bar should actually go,
261
260
  # which we do in _format_description. Other minor things too; see below.
262
261
  sys_stdout_write = sys.stdout.write
262
+ last_total = None ; last_progress = None ; last_text = None # noqa
263
263
  def tidy_stdout_write(text: str) -> None: # noqa
264
264
  nonlocal self, sys_stdout_write, sentinel_internal, spina, spini, spinn
265
+ nonlocal last_total, last_progress, last_text
265
266
  def replace_first(value: str, match: str, replacement: str) -> str: # noqa
266
267
  return value[:i] + replacement + value[i + len(match):] if (i := value.find(match)) >= 0 else value
267
268
  def remove_extra_trailing_spaces(text: str) -> str: # noqa
@@ -270,6 +271,10 @@ class ProgressBar:
270
271
  return text
271
272
  if not text:
272
273
  return
274
+ if self._bar:
275
+ if ((self._bar.total == last_total) and (self._bar.n == last_progress) and (last_text == text)):
276
+ return
277
+ last_total = self._bar.total ; last_progress = self._bar.n ; last_text = text # noqa
273
278
  if (self._disabled or self._done) and sentinel_internal in text:
274
279
  # Another hack to really disable output on interrupt; in this case we set
275
280
  # tqdm.disable to True, but output can still dribble out, so if the output
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.8.3.1b2
3
+ Version: 8.8.3.1b4
4
4
  Summary: Utility package for interacting with the 4DN Data Portal and other 4DN resources
5
5
  Home-page: https://github.com/4dn-dcic/utils
6
6
  License: MIT
@@ -48,7 +48,7 @@ dcicutils/obfuscation_utils.py,sha256=fo2jOmDRC6xWpYX49u80bVNisqRRoPskFNX3ymFAmj
48
48
  dcicutils/opensearch_utils.py,sha256=V2exmFYW8Xl2_pGFixF4I2Cc549Opwe4PhFi5twC0M8,1017
49
49
  dcicutils/portal_object_utils.py,sha256=gDXRgPsRvqCFwbC8WatsuflAxNiigOnqr0Hi93k3AgE,15422
50
50
  dcicutils/portal_utils.py,sha256=Xm0IqL2dA9C2gx98cPEbvlo81V76bEmpUpxb_8S3VqM,30480
51
- dcicutils/progress_bar.py,sha256=sLX0_L1JRrtGSABOkNS-Y5prcWvZqsyxis_oTYbaLk0,14091
51
+ dcicutils/progress_bar.py,sha256=ZuWJJ7FAkv8ndU1vwcg-0TAG76Tm05m3-d97G4b7YzE,14463
52
52
  dcicutils/project_utils.py,sha256=qPdCaFmWUVBJw4rw342iUytwdQC0P-XKpK4mhyIulMM,31250
53
53
  dcicutils/qa_checkers.py,sha256=cdXjeL0jCDFDLT8VR8Px78aS10hwNISOO5G_Zv2TZ6M,20534
54
54
  dcicutils/qa_utils.py,sha256=TT0SiJWiuxYvbsIyhK9VO4uV_suxhB6CpuC4qPacCzQ,160208
@@ -72,8 +72,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
72
72
  dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
73
73
  dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
74
74
  dcicutils/zip_utils.py,sha256=rnjNv_k6L9jT2SjDSgVXp4BEJYLtz9XN6Cl2Fy-tqnM,2027
75
- dcicutils-8.8.3.1b2.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
76
- dcicutils-8.8.3.1b2.dist-info/METADATA,sha256=nOF-Y3McrAK89qI09YdZEMAlJ_IsoquS9KBZAj_YXr4,3356
77
- dcicutils-8.8.3.1b2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
78
- dcicutils-8.8.3.1b2.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
79
- dcicutils-8.8.3.1b2.dist-info/RECORD,,
75
+ dcicutils-8.8.3.1b4.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
76
+ dcicutils-8.8.3.1b4.dist-info/METADATA,sha256=SU3-GNJsxb2pu-dBBV8wXLAigORCxsI0-oYH6uE2gdc,3356
77
+ dcicutils-8.8.3.1b4.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
78
+ dcicutils-8.8.3.1b4.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
79
+ dcicutils-8.8.3.1b4.dist-info/RECORD,,