progressbar2 4.4.2__tar.gz → 4.4.3__tar.gz
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.
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.github/workflows/stale.yml +2 -2
- {progressbar2-4.4.2 → progressbar2-4.4.3}/PKG-INFO +1 -9
- {progressbar2-4.4.2 → progressbar2-4.4.3}/README.rst +0 -8
- {progressbar2-4.4.2 → progressbar2-4.4.3}/examples.py +1 -1
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/__about__.py +1 -1
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/bar.py +50 -50
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/utils.py +1 -1
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/widgets.py +2 -2
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar2.egg-info/PKG-INFO +1 -9
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/original_examples.py +1 -1
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_utils.py +2 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_widgets.py +1 -1
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.github/FUNDING.yml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.github/ci-reporter.yml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.github/workflows/codeql.yml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.github/workflows/main.yml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.gitignore +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.pre-commit-config.yaml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/.readthedocs.yaml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/CHANGES.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/CONTRIBUTING.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/ISSUE_TEMPLATE +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/LICENSE +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/MANIFEST.in +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/Makefile +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/appveyor.yml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/circle.yml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/.gitignore +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/Makefile +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/LICENSE +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/flask_theme_support.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/wolph/layout.html +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/wolph/relations.html +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/wolph/static/flasky.css_t +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/wolph/static/small_flask.css +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/_theme/wolph/theme.conf +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/conf.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/contributing.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/examples.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/history.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/index.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/installation.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/make.bat +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.algorithms.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.bar.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.base.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.env.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.multi.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.shortcuts.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.terminal.base.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.terminal.colors.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.terminal.os_specific.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.terminal.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.terminal.stream.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.utils.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/progressbar.widgets.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/requirements.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/docs/usage.rst +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/__init__.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/__main__.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/algorithms.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/base.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/env.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/multi.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/py.typed +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/shortcuts.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/__init__.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/base.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/colors.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/os_specific/__init__.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/os_specific/posix.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/os_specific/windows.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar/terminal/stream.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar2.egg-info/SOURCES.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar2.egg-info/dependency_links.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar2.egg-info/entry_points.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar2.egg-info/requires.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/progressbar2.egg-info/top_level.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/pyproject.toml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/pytest.ini +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/requirements.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/ruff.toml +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/setup.cfg +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/conftest.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/requirements.txt +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_algorithms.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_backwards_compatibility.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_color.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_custom_widgets.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_data.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_data_transfer_bar.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_dill_pickle.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_empty.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_end.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_failure.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_flush.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_iterators.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_job_status.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_large_values.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_misc.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_monitor_progress.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_multibar.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_progressbar.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_progressbar_command.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_samples.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_speed.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_stream.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_terminal.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_timed.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_timer.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_unicode.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_unknown_length.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_windows.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_with.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tests/test_wrappingio.py +0 -0
- {progressbar2-4.4.2 → progressbar2-4.4.3}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: progressbar2
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.3
|
|
4
4
|
Summary: A Python Progressbar library to provide visual (yet text based) progress to long running operations.
|
|
5
5
|
Author-email: "Rick van Hattem (Wolph)" <wolph@wol.ph>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -153,14 +153,6 @@ of widgets:
|
|
|
153
153
|
The progressbar module is very easy to use, yet very powerful. It will also
|
|
154
154
|
automatically enable features like auto-resizing when the system supports it.
|
|
155
155
|
|
|
156
|
-
******************************************************************************
|
|
157
|
-
Security contact information
|
|
158
|
-
******************************************************************************
|
|
159
|
-
|
|
160
|
-
To report a security vulnerability, please use the
|
|
161
|
-
`Tidelift security contact <https://tidelift.com/security>`_.
|
|
162
|
-
Tidelift will coordinate the fix and disclosure.
|
|
163
|
-
|
|
164
156
|
******************************************************************************
|
|
165
157
|
Known issues
|
|
166
158
|
******************************************************************************
|
|
@@ -71,14 +71,6 @@ of widgets:
|
|
|
71
71
|
The progressbar module is very easy to use, yet very powerful. It will also
|
|
72
72
|
automatically enable features like auto-resizing when the system supports it.
|
|
73
73
|
|
|
74
|
-
******************************************************************************
|
|
75
|
-
Security contact information
|
|
76
|
-
******************************************************************************
|
|
77
|
-
|
|
78
|
-
To report a security vulnerability, please use the
|
|
79
|
-
`Tidelift security contact <https://tidelift.com/security>`_.
|
|
80
|
-
Tidelift will coordinate the fix and disclosure.
|
|
81
|
-
|
|
82
74
|
******************************************************************************
|
|
83
75
|
Known issues
|
|
84
76
|
******************************************************************************
|
|
@@ -21,7 +21,7 @@ long running operations.
|
|
|
21
21
|
'''.strip().split(),
|
|
22
22
|
)
|
|
23
23
|
__email__ = 'wolph@wol.ph'
|
|
24
|
-
__version__ = '4.4.
|
|
24
|
+
__version__ = '4.4.3'
|
|
25
25
|
__license__ = 'BSD'
|
|
26
26
|
__copyright__ = 'Copyright 2015 Rick van Hattem (Wolph)'
|
|
27
27
|
__url__ = 'https://github.com/WoLpH/python-progressbar'
|
|
@@ -188,13 +188,13 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
188
188
|
enable_colors: progressbar.env.ColorSupport = progressbar.env.COLOR_SUPPORT
|
|
189
189
|
|
|
190
190
|
def __init__(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
self,
|
|
192
|
+
fd: base.TextIO = sys.stderr,
|
|
193
|
+
is_terminal: bool | None = None,
|
|
194
|
+
line_breaks: bool | None = None,
|
|
195
|
+
enable_colors: progressbar.env.ColorSupport | None = None,
|
|
196
|
+
line_offset: int = 0,
|
|
197
|
+
**kwargs,
|
|
198
198
|
):
|
|
199
199
|
if fd is sys.stdout:
|
|
200
200
|
fd = utils.streams.original_stdout
|
|
@@ -211,9 +211,9 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
211
211
|
super().__init__(**kwargs)
|
|
212
212
|
|
|
213
213
|
def _apply_line_offset(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
self,
|
|
215
|
+
fd: base.TextIO,
|
|
216
|
+
line_offset: int,
|
|
217
217
|
) -> base.TextIO:
|
|
218
218
|
if line_offset:
|
|
219
219
|
return progressbar.terminal.stream.LineOffsetStreamWrapper(
|
|
@@ -233,8 +233,8 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
233
233
|
return line_breaks
|
|
234
234
|
|
|
235
235
|
def _determine_enable_colors(
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
self,
|
|
237
|
+
enable_colors: progressbar.env.ColorSupport | None,
|
|
238
238
|
) -> progressbar.env.ColorSupport:
|
|
239
239
|
'''
|
|
240
240
|
Determines the color support for the progress bar.
|
|
@@ -314,9 +314,9 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
314
314
|
self.fd.write(types.cast(str, line.encode('ascii', 'replace')))
|
|
315
315
|
|
|
316
316
|
def finish(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
self,
|
|
318
|
+
*args: types.Any,
|
|
319
|
+
**kwargs: types.Any,
|
|
320
320
|
) -> None: # pragma: no cover
|
|
321
321
|
os_specific.reset_console_mode()
|
|
322
322
|
|
|
@@ -348,8 +348,8 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
348
348
|
|
|
349
349
|
for index, widget in enumerate(self.widgets):
|
|
350
350
|
if isinstance(
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
widget,
|
|
352
|
+
widgets.WidgetBase,
|
|
353
353
|
) and not widget.check_size(self):
|
|
354
354
|
continue
|
|
355
355
|
elif isinstance(widget, widgets.AutoWidthWidgetBase):
|
|
@@ -427,10 +427,10 @@ class StdRedirectMixin(DefaultFdMixin):
|
|
|
427
427
|
_stderr: base.IO
|
|
428
428
|
|
|
429
429
|
def __init__(
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
430
|
+
self,
|
|
431
|
+
redirect_stderr: bool = False,
|
|
432
|
+
redirect_stdout: bool = False,
|
|
433
|
+
**kwargs,
|
|
434
434
|
):
|
|
435
435
|
DefaultFdMixin.__init__(self, **kwargs)
|
|
436
436
|
self.redirect_stderr = redirect_stderr
|
|
@@ -558,23 +558,23 @@ class ProgressBar(
|
|
|
558
558
|
paused: bool = False
|
|
559
559
|
|
|
560
560
|
def __init__(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
561
|
+
self,
|
|
562
|
+
min_value: NumberT = 0,
|
|
563
|
+
max_value: NumberT | types.Type[base.UnknownLength] | None = None,
|
|
564
|
+
widgets: types.Optional[
|
|
565
|
+
types.Sequence[widgets_module.WidgetBase | str]
|
|
566
|
+
] = None,
|
|
567
|
+
left_justify: bool = True,
|
|
568
|
+
initial_value: NumberT = 0,
|
|
569
|
+
poll_interval: types.Optional[float] = None,
|
|
570
|
+
widget_kwargs: types.Optional[types.Dict[str, types.Any]] = None,
|
|
571
|
+
custom_len: types.Callable[[str], int] = utils.len_color,
|
|
572
|
+
max_error=True,
|
|
573
|
+
prefix=None,
|
|
574
|
+
suffix=None,
|
|
575
|
+
variables=None,
|
|
576
|
+
min_poll_interval=None,
|
|
577
|
+
**kwargs,
|
|
578
578
|
): # sourcery skip: low-code-quality
|
|
579
579
|
'''Initializes a progress bar with sane defaults.'''
|
|
580
580
|
StdRedirectMixin.__init__(self, **kwargs)
|
|
@@ -639,8 +639,8 @@ class ProgressBar(
|
|
|
639
639
|
default=None,
|
|
640
640
|
)
|
|
641
641
|
self._MINIMUM_UPDATE_INTERVAL = (
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
utils.deltas_to_seconds(self._MINIMUM_UPDATE_INTERVAL)
|
|
643
|
+
or self._MINIMUM_UPDATE_INTERVAL
|
|
644
644
|
)
|
|
645
645
|
|
|
646
646
|
# Note that the _MINIMUM_UPDATE_INTERVAL sets the minimum in case of
|
|
@@ -656,8 +656,8 @@ class ProgressBar(
|
|
|
656
656
|
self.variables = utils.AttributeDict(variables or {})
|
|
657
657
|
for widget in self.widgets:
|
|
658
658
|
if (
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
isinstance(widget, widgets_module.VariableMixin)
|
|
660
|
+
and widget.name not in self.variables
|
|
661
661
|
):
|
|
662
662
|
self.variables[widget.name] = None
|
|
663
663
|
|
|
@@ -778,7 +778,7 @@ class ProgressBar(
|
|
|
778
778
|
total_seconds_elapsed=total_seconds_elapsed,
|
|
779
779
|
# The seconds since the bar started modulo 60
|
|
780
780
|
seconds_elapsed=(elapsed.seconds % 60)
|
|
781
|
-
|
|
781
|
+
+ (elapsed.microseconds / 1000000.0),
|
|
782
782
|
# The minutes since the bar started modulo 60
|
|
783
783
|
minutes_elapsed=(elapsed.seconds / 60) % 60,
|
|
784
784
|
# The hours since the bar started modulo 24
|
|
@@ -908,9 +908,9 @@ class ProgressBar(
|
|
|
908
908
|
self.start()
|
|
909
909
|
|
|
910
910
|
if (
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
911
|
+
value is not None
|
|
912
|
+
and value is not base.UnknownLength
|
|
913
|
+
and isinstance(value, (int, float))
|
|
914
914
|
):
|
|
915
915
|
if self.max_value is base.UnknownLength:
|
|
916
916
|
# Can't compare against unknown lengths so just update
|
|
@@ -1033,11 +1033,11 @@ class ProgressBar(
|
|
|
1033
1033
|
|
|
1034
1034
|
def _verify_max_value(self):
|
|
1035
1035
|
if (
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1036
|
+
self.max_value is not base.UnknownLength
|
|
1037
|
+
and self.max_value is not None
|
|
1038
|
+
and self.max_value < 0 # type: ignore
|
|
1039
1039
|
):
|
|
1040
|
-
raise ValueError('max_value out of range, got
|
|
1040
|
+
raise ValueError(f'max_value out of range, got {self.max_value!r}')
|
|
1041
1041
|
|
|
1042
1042
|
def _calculate_poll_interval(self) -> None:
|
|
1043
1043
|
self.num_intervals = max(100, self.term_width)
|
|
@@ -97,7 +97,7 @@ def no_color(value: StringT) -> StringT:
|
|
|
97
97
|
elif isinstance(value, str):
|
|
98
98
|
return re.sub('\x1b\\[.*?[@-~]', '', value) # type: ignore
|
|
99
99
|
else:
|
|
100
|
-
raise TypeError('`value` must be a string or bytes, got
|
|
100
|
+
raise TypeError(f'`value` must be a string or bytes, got {value!r}')
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
def len_color(value: types.StringTypes) -> int:
|
|
@@ -547,7 +547,7 @@ class ETA(Timer):
|
|
|
547
547
|
|
|
548
548
|
data['eta'] = None
|
|
549
549
|
if data['eta_seconds']:
|
|
550
|
-
with contextlib.suppress(ValueError, OverflowError):
|
|
550
|
+
with contextlib.suppress(ValueError, OverflowError, OSError):
|
|
551
551
|
data['eta'] = utils.format_time(data['eta_seconds'])
|
|
552
552
|
|
|
553
553
|
if data['value'] == progress.min_value:
|
|
@@ -560,7 +560,7 @@ class ETA(Timer):
|
|
|
560
560
|
fmt = self.format_NA
|
|
561
561
|
else:
|
|
562
562
|
fmt = self.format_zero
|
|
563
|
-
|
|
563
|
+
:
|
|
564
564
|
return Timer.__call__(self, progress, data, format=fmt)
|
|
565
565
|
|
|
566
566
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: progressbar2
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.3
|
|
4
4
|
Summary: A Python Progressbar library to provide visual (yet text based) progress to long running operations.
|
|
5
5
|
Author-email: "Rick van Hattem (Wolph)" <wolph@wol.ph>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -153,14 +153,6 @@ of widgets:
|
|
|
153
153
|
The progressbar module is very easy to use, yet very powerful. It will also
|
|
154
154
|
automatically enable features like auto-resizing when the system supports it.
|
|
155
155
|
|
|
156
|
-
******************************************************************************
|
|
157
|
-
Security contact information
|
|
158
|
-
******************************************************************************
|
|
159
|
-
|
|
160
|
-
To report a security vulnerability, please use the
|
|
161
|
-
`Tidelift security contact <https://tidelift.com/security>`_.
|
|
162
|
-
Tidelift will coordinate the fix and disclosure.
|
|
163
|
-
|
|
164
156
|
******************************************************************************
|
|
165
157
|
Known issues
|
|
166
158
|
******************************************************************************
|
|
@@ -15,11 +15,13 @@ import pytest
|
|
|
15
15
|
('t', True),
|
|
16
16
|
('yes', True),
|
|
17
17
|
('true', True),
|
|
18
|
+
('True', True),
|
|
18
19
|
('0', False),
|
|
19
20
|
('n', False),
|
|
20
21
|
('f', False),
|
|
21
22
|
('no', False),
|
|
22
23
|
('false', False),
|
|
24
|
+
('False', False),
|
|
23
25
|
],
|
|
24
26
|
)
|
|
25
27
|
def test_env_flag(value, expected, monkeypatch):
|
|
@@ -58,7 +58,7 @@ def test_widgets_large_values(max_value):
|
|
|
58
58
|
|
|
59
59
|
def test_format_widget():
|
|
60
60
|
widgets = [
|
|
61
|
-
progressbar.FormatLabel('
|
|
61
|
+
progressbar.FormatLabel(f'%({mapping})r')
|
|
62
62
|
for mapping in progressbar.FormatLabel.mapping
|
|
63
63
|
]
|
|
64
64
|
p = progressbar.ProgressBar(widgets=widgets)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|