progress-table 2.2.7__tar.gz → 2.3.0__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.
Files changed (22) hide show
  1. {progress_table-2.2.7 → progress_table-2.3.0}/PKG-INFO +1 -1
  2. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/__init__.py +1 -1
  3. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v1/progress_table.py +30 -1
  4. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table.egg-info/PKG-INFO +1 -1
  5. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table.egg-info/PKG-INFO.sync-conflict-20240314-015933-NXTV2IO +0 -0
  6. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table.egg-info/SOURCES.txt +0 -0
  7. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table.egg-info/dependency_links.txt +0 -0
  8. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table.egg-info/requires.txt +0 -0
  9. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table.egg-info/top_level.txt +0 -0
  10. {progress_table-2.2.7 → progress_table-2.3.0}/LICENSE.txt +0 -0
  11. {progress_table-2.2.7 → progress_table-2.3.0}/README.md +0 -0
  12. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v0/__init__.py +0 -0
  13. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v0/progress_table.py +0 -0
  14. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v0/symbols.py +0 -0
  15. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v1/__init__.py +0 -0
  16. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v1/common.py +0 -0
  17. {progress_table-2.2.7 → progress_table-2.3.0}/progress_table/v1/styles.py +0 -0
  18. {progress_table-2.2.7 → progress_table-2.3.0}/pyproject.toml +0 -0
  19. {progress_table-2.2.7 → progress_table-2.3.0}/setup.cfg +0 -0
  20. {progress_table-2.2.7 → progress_table-2.3.0}/setup.py +0 -0
  21. {progress_table-2.2.7 → progress_table-2.3.0}/tests/test_docs_automated.py +0 -0
  22. {progress_table-2.2.7 → progress_table-2.3.0}/tests/test_examples_automated.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: progress-table
3
- Version: 2.2.7
3
+ Version: 2.3.0
4
4
  Summary: Display progress as a pretty table in the command line.
5
5
  Home-page: https://github.com/gahaalt/progress-table.git
6
6
  Author: Szymon Mikler
@@ -1,6 +1,6 @@
1
1
  # Copyright (c) 2022-2024 Szymon Mikler
2
2
 
3
- __version__ = "2.2.7"
3
+ __version__ = "2.3.0"
4
4
 
5
5
  from progress_table.v0.progress_table import ProgressTableV0
6
6
  from progress_table.v1 import styles
@@ -1013,10 +1013,39 @@ class TableProgressBar:
1013
1013
  return "".join(pbar)
1014
1014
 
1015
1015
  def update(self, n=1):
1016
+ """Update the progress bar steps.
1017
+
1018
+ Args:
1019
+ n: Number of steps to update the progress bar.
1020
+ """
1016
1021
  self._step += n
1017
1022
 
1018
1023
  def reset(self, total=None):
1019
- self._step = total or 0
1024
+ """Reset the progress bar.
1025
+
1026
+ Args:
1027
+ total: Modify the total number of iterations. Optional.
1028
+ """
1029
+ self._step = 0
1030
+
1031
+ if total:
1032
+ self._total = total
1033
+
1034
+ def set_step(self, step):
1035
+ """Overwrite the current step.
1036
+
1037
+ Args:
1038
+ step: New value of the current step.
1039
+ """
1040
+ self._step = step
1041
+
1042
+ def set_total(self, total):
1043
+ """Overwrite the total number of iterations.
1044
+
1045
+ Args:
1046
+ total: New value of the total number of iterations
1047
+ """
1048
+ self._total = total
1020
1049
 
1021
1050
  def __iter__(self):
1022
1051
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: progress-table
3
- Version: 2.2.7
3
+ Version: 2.3.0
4
4
  Summary: Display progress as a pretty table in the command line.
5
5
  Home-page: https://github.com/gahaalt/progress-table.git
6
6
  Author: Szymon Mikler
File without changes
File without changes
File without changes