Skip to content

Commit eb16c1a

Browse files
committed
Fix display issues
Had the inheritance and calls to super() based on C#, and not actual Python. Rendering now works
1 parent 90640b7 commit eb16c1a

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

adafruit_progressbar/__init__.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def progress(self, value):
160160
# If we're using floats, from 0.0 to 1.0, using 4 decimal places allows us to handle values
161161
# as precise as 0.23456, which evaluates to a percentage value of 23.45% (with rounding)
162162
self._progress = round(value, 4)
163+
print(f"Calling render() with ({_old_value}, {self.progress}, {self.progress})")
163164
self.render(_old_value, self.progress, self.progress)
164165

165166
@property
@@ -205,10 +206,3 @@ def render(self, _old_value, _new_value, _progress_value) -> None:
205206
:type _progress_value: float
206207
:rtype None:
207208
"""
208-
209-
def info(self):
210-
"""This is the `info` method. It gives you info.
211-
212-
This information is usefull for debugging, and
213-
for testing inherited documentation.
214-
"""

adafruit_progressbar/progressbar.py

-20
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ def __init__(
7979

8080
# _outline_color: int # The colour used for the border of the widget
8181

82-
@property
83-
def progress(self):
84-
"""Returns the current progress value (percentage)"""
85-
return ProgressBarBase.progress.fget(self)
86-
87-
@progress.setter
88-
def progress(self, value):
89-
"""Draws the progress bar
90-
91-
:param value: Progress bar value.
92-
:type value: float
93-
"""
94-
assert value <= 1.0, "Progress value may not be > 100%"
95-
assert isinstance(
96-
value, float
97-
), "Progress value must be a floating point value."
98-
99-
# pylint: disable=no-member
100-
self._progress = value
101-
10282
@property
10383
def outline_color(self):
10484
"""Returns the currently configured value for the color of the

0 commit comments

Comments
 (0)