On Python < 3.11, IntFlag.name returns None for composite flags (e.g. NotificationFlag(0x000900) = SOFTWARE_PRESENT|WIRELESS). The previous fix (#3184) returns an empty list in this case, losing the flag names. This commit decomposes composite flags manually by iterating over enum members, producing correct results on all supported Python versions (>= 3.8 as declared in setup.py). Add regression tests covering composite flags and None input. Tested on: - Python 3.9.2 (Debian 11): 56/56 passed - Python 3.11.15 (pyenv): 56/56 passed Refs #3184 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| base_usb.py | ||
| centurion.py | ||
| centurion_constants.py | ||
| common.py | ||
| descriptors.py | ||
| desktop_notifications.py | ||
| device.py | ||
| diversion.py | ||
| exceptions.py | ||
| hidpp10.py | ||
| hidpp10_constants.py | ||
| hidpp20.py | ||
| hidpp20_constants.py | ||
| i18n.py | ||
| listener.py | ||
| notifications.py | ||
| onboard_eq.py | ||
| receiver.py | ||
| settings.py | ||
| settings_new.py | ||
| settings_templates.py | ||
| settings_validator.py | ||
| special_keys.py | ||