Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
DamKast committed Jun 21, 2024
1 parent 44d90e6 commit a097f12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_types_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_channel_entry():
assert channel_entry != t.ChannelEntry(page=0, channel_mask=0x0200)

# Test __repr__
expected_repr = "ChannelEntry(page=1, channels=<Channels: 256>)"
expected_repr = "ChannelEntry(page=1, channels=<Channels.256: 256>)"
assert repr(channel_entry) == expected_repr

Check failure on line 35 in tests/test_types_named.py

View workflow job for this annotation

GitHub Actions / Run tests Python 3.11.0

test_channel_entry AssertionError: assert 'ChannelEntry...annels: 256>)' == 'ChannelEntry...ls.256: 256>)' - ChannelEntry(page=1, channels=<Channels.256: 256>) ? ---- + ChannelEntry(page=1, channels=<Channels: 256>)

Check failure on line 35 in tests/test_types_named.py

View workflow job for this annotation

GitHub Actions / Run tests Python 3.12

test_channel_entry AssertionError: assert 'ChannelEntry...annels: 256>)' == 'ChannelEntry...ls.256: 256>)' - ChannelEntry(page=1, channels=<Channels.256: 256>) ? ---- + ChannelEntry(page=1, channels=<Channels: 256>)

# Test handling of None types for page or channel_mask
Expand Down
3 changes: 2 additions & 1 deletion zigpy_zboss/types/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ def __init__(self, *, partial=False, **params):
issubclass(param.type, (t.ShortBytes, t.LongBytes)),

isinstance(value, list) and issubclass(param.type, list),
isinstance(value, bool) and issubclass(param.type, t.Bool),
isinstance(
value, bool) and issubclass(param.type, t_named.Bool),
]
# fmt: on

Expand Down

0 comments on commit a097f12

Please sign in to comment.