Skip to content

Commit 93e10a4

Browse files
committed
ble.lwp3: fix spelling of INPUT
1 parent 45e873d commit 93e10a4

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9494
### Fixed
9595
- Wait for some time to allow program output to be received before disconnecting
9696
in the `run` command.
97+
- Fixed spelling of `INPUT` in `pybricksdev.ble.lwp3.messages`.
9798

9899
## [1.0.0-alpha.3] - 2021-04-09
99100
### Changed

pybricksdev/ble/lwp3/bytecodes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ class PortInfoFormatSetupCommand(IntEnum):
958958
class ModeCapabilities(IntFlag):
959959

960960
OUTPUT = 1 << 0
961-
INTPUT = 1 << 1
961+
INPUT = 1 << 1
962962
LOGICAL_COMBINABLE = 1 << 2
963963
LOGICAL_SYNCHRONIZEABLE = 1 << 3
964964

tests/ble/test_lwp3_messages.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ class TestPortInfoModeInfoMessage:
926926
def test_constructor(self):
927927
msg = PortInfoModeInfoMessage(
928928
PortID(1),
929-
ModeCapabilities.INTPUT | ModeCapabilities.OUTPUT,
929+
ModeCapabilities.INPUT | ModeCapabilities.OUTPUT,
930930
num_modes=5,
931931
input_modes=[0, 1, 2],
932932
output_modes=[3, 4],
@@ -936,15 +936,14 @@ def test_constructor(self):
936936
assert msg.port is PortID(1)
937937
assert msg.info_kind is InfoKind.MODE_INFO
938938
assert (
939-
msg.capabilities
940-
== ModeCapabilities.INTPUT | ModeCapabilities.OUTPUT
939+
msg.capabilities == ModeCapabilities.INPUT | ModeCapabilities.OUTPUT
941940
)
942941
assert msg.num_modes == 5
943942
assert msg.input_modes == [0, 1, 2]
944943
assert msg.output_modes == [3, 4]
945944
assert (
946945
repr(msg)
947-
== "PortInfoModeInfoMessage(<PortID.1: 1>, <ModeCapabilities.INTPUT|OUTPUT: 3>, 5, [0, 1, 2], [3, 4])"
946+
== "PortInfoModeInfoMessage(<PortID.1: 1>, <ModeCapabilities.INPUT|OUTPUT: 3>, 5, [0, 1, 2], [3, 4])"
948947
)
949948

950949
def test_parse_message(self):
@@ -955,8 +954,7 @@ def test_parse_message(self):
955954
assert msg.port is PortID(1)
956955
assert msg.info_kind is InfoKind.MODE_INFO
957956
assert (
958-
msg.capabilities
959-
== ModeCapabilities.INTPUT | ModeCapabilities.OUTPUT
957+
msg.capabilities == ModeCapabilities.INPUT | ModeCapabilities.OUTPUT
960958
)
961959
assert msg.num_modes == 5
962960
assert msg.input_modes == [0, 1, 2]

0 commit comments

Comments
 (0)