Fix enum.Flag issue occuring with Python3.11.1 #413
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
❯ pytest --cov-report term-missing --cov=pydeconz tests/ ImportError while loading conftest '/Users/robban/Development/deconz/tests/conftest.py'.
tests/conftest.py:10: in
from pydeconz import DeconzSession
pydeconz/init.py:2: in
from .gateway import DeconzSession # noqa: F401
pydeconz/gateway.py:12: in
from .interfaces.alarm_systems import AlarmSystems
pydeconz/interfaces/alarm_systems.py:6: in
from ..models.alarm_system import (
pydeconz/models/alarm_system.py:46: in
class AlarmSystemArmMask(enum.Flag):
/opt/homebrew/Cellar/python@3.11/3.11.2/Frameworks/Python.framework/Versions/3.11/lib/python3.11/enum.py:560: in new
raise exc
/opt/homebrew/Cellar/python@3.11/3.11.2/Frameworks/Python.framework/Versions/3.11/lib/python3.11/enum.py:300: in set_name
and _is_single_bit(value)
/opt/homebrew/Cellar/python@3.11/3.11.2/Frameworks/Python.framework/Versions/3.11/lib/python3.11/enum.py:98: in _is_single_bit
num &= num - 1
E TypeError: unsupported operand type(s) for -: 'str' and 'int'