-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Description
Describe the bug
ColorsGenerator never actually returns random colors.
Traceback (most recent call last):
File "/home/arthurgossuin/code/gempy/z.py", line 6, in <module>
next(color_iterator)
File "/home/arthurgossuin/code/gempy/gempy/core/color_generator.py", line 69, in __next__
result = self.hex_colors[self._index]
~~~~~~~~~~~~~~~^^^^^^^^^^^^^
IndexError: list index out of range
To Reproduce
Here is the content of the file used to produce the bug:
import gempy as gp
color_iterator = gp.ColorsGenerator()
for color in range(len(color_iterator.hex_colors) + 1):
next(color_iterator)
Expected behavior
The code seems to imply that we should fall back on random colors once there are no colors left in hex_colors.
Screenshots
pass
Desktop (please complete the following information):
- OS: irrelevant
- GemPy Version
Additional context
As an ex geology student, and now fulltime software developer, I was intrigued by the library and started browsing the files when I found that bug. I would be happy to contribute further if you are open to it.
Metadata
Metadata
Assignees
Labels
No labels