Addressing the issue of registering groups ( #854 ) I changed the following:
Use an empty dict as a default for default_hints
Use hasattr() instead of bare object access/check
When default_hints is passed to the Status object instanciation the following error Fatal Error - ValueError(Additional arguments are invalid if 'module' is already an object) is shown.
This can be handled by excluding type of i3pystatus.group.Group in the check at L118 but I could not import the class due to:
File "/github/i3pystatus/venv/lib/python3.11/site-packages/i3pystatus/core/__init__.py", line 6, in <module>
from i3pystatus.group import Group
File "/github/i3pystatus/venv/lib/python3.11/site-packages/i3pystatus/group.py", line 1, in <module>
from i3pystatus import IntervalModule, Status, Module
ImportError: cannot import name 'IntervalModule' from partially initialized module 'i3pystatus' (most likely due to a circular import) (/github/i3pystatus/venv/lib/python3.11/site-packages/i3pystatus/__init__.py)
I could fix all imports but the import of Status which also showed the above error
Addressing the issue of registering groups ( #854 ) I changed the following:
Use an empty dict as a default for
default_hints
Usehasattr()
instead of bare object access/checkWhen
default_hints
is passed to theStatus
object instanciation the following errorFatal Error - ValueError(Additional arguments are invalid if 'module' is already an object)
is shown.This can be handled by excluding type of
i3pystatus.group.Group
in the check at L118 but I could not import the class due to:I could fix all imports but the import of
Status
which also showed the above error