Skip to content

Commit 62e2143

Browse files
lobodpavdlech
authored andcommitted
connections: Split to multiple files
1 parent 8b891e9 commit 62e2143

File tree

8 files changed

+736
-712
lines changed

8 files changed

+736
-712
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Added ``PybricksHub.race_disconnect()`` method.
1111

12+
### Changed
13+
- Moved `EV3Connection` from `connections` to `connections.ev3dev`.
14+
- Moved `REPLHub` from `connections` to `connections.lego`.
15+
- Moved `PybricksHub` from `connections` to `connections.pybricks`.
16+
1217
### Fixed
1318
- Fixed race condition with `pybricksdev run ble` not waiting for program to
1419
finish before disconnecting ([pybricksdev#28]).

pybricksdev/cli/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ def add_parser(self, subparsers: argparse._SubParsersAction):
165165

166166
async def run(self, args: argparse.Namespace):
167167
from ..ble import find_device
168-
from ..connections import EV3Connection, PybricksHub, REPLHub
168+
from ..connections.ev3dev import EV3Connection
169+
from ..connections.lego import REPLHub
170+
from ..connections.pybricks import PybricksHub
169171

170172
# Pick the right connection
171173
if args.conntype == "ssh":

pybricksdev/cli/flash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
unpack_pnp_id,
3737
)
3838
from ..compile import compile_file
39-
from ..connections import REPLHub
39+
from ..connections.lego import REPLHub
4040
from ..dfu import flash_dfu
4141
from ..flash import BootloaderConnection, create_firmware
4242
from ..tools import chunk

0 commit comments

Comments
 (0)