Laurens Valk
d3ca8ee719
pybricks.iodevices: Add XboxController.
2024-02-11 14:26:03 +01:00
Laurens Valk
fd61866f2b
pybricks.iodevices: Make LWP3 write awaitable.
2023-11-16 12:01:28 +01:00
David Lechner
821a3e4455
pybricks.*: add MaybeAwaitable types
...
Many blocking functions now return Awaitable[T] when the async run
loop is running. The static analysis tools don't have a way of
knowing this, so the best we can do is return both types so that
x = method() and x = await method() both work mostly as expected.
2023-06-12 17:04:09 -05:00
David Lechner
a2d9c33eb5
jedi: add new pybricks_jedi package
...
This package will be used in Pybricks Code to provide some intellesense
operations.
2022-06-24 14:52:45 -05:00
Laurens Valk
e456c8ef91
pybricks: Drop underscores on imports.
...
Fixes https://github.com/pybricks/pybricks-api/issues/101
2022-06-10 11:10:20 +02:00
Laurens Valk
6500440031
pybricks: Drop most ellipsis and pass instances.
...
See [1]: "I still prefer ... over pass. This clarifies to the readers that they are reading a stub. But if there's a docstring we need neither."
[1] https://github.com/srittau/type-stub-pep/issues/88#issuecomment-758843441
Fixes https://github.com/pybricks/pybricks-api/issues/101#issuecomment-1148780369
2022-06-10 10:46:44 +02:00
Laurens Valk
c77682f50d
pybricks.iodevices: Add typing.
2022-06-10 10:05:11 +02:00
David Lechner
b6d1eef2a1
pybricks.iodevices.LWP3Device: add api and docs
...
This adds docs and API stubs for pybricks.iodevices.LWP3Device.
Fixes: https://github.com/pybricks/support/issues/534
2021-11-19 19:31:53 -06:00
David Lechner
7126431f9f
pybricks: move into src/ directory
...
Moving the pybricks package into a src/ directory so that we can add
additional packages without polluting the top-level directory.
2021-07-14 09:41:30 +02:00