From 098c8e60abc2f728af018ae92bb27eb12fad01c7 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Tue, 27 Dec 2022 13:28:44 -0600 Subject: [PATCH] editor/pybricksMicroPython: add Side to hub template This is included in pybricks.parameters on all hubs. --- src/editor/pybricksMicroPython.ts | 2 +- src/explorer/sagas.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/pybricksMicroPython.ts b/src/editor/pybricksMicroPython.ts index ffdb1340..0ccb0fda 100644 --- a/src/editor/pybricksMicroPython.ts +++ b/src/editor/pybricksMicroPython.ts @@ -309,7 +309,7 @@ export const language = { function createTemplate(hubClassName: string, deviceClassNames: string[]): string { return `from pybricks.hubs import ${hubClassName} from pybricks.pupdevices import ${deviceClassNames.join(', ')} -from pybricks.parameters import Button, Color, Direction, Port, Stop +from pybricks.parameters import Button, Color, Direction, Port, Side, Stop from pybricks.robotics import DriveBase from pybricks.tools import wait, StopWatch diff --git a/src/explorer/sagas.test.ts b/src/explorer/sagas.test.ts index 54de3809..0248a36c 100644 --- a/src/explorer/sagas.test.ts +++ b/src/explorer/sagas.test.ts @@ -294,7 +294,7 @@ describe('handleExplorerCreateNewFile', () => { { "contents": "from pybricks.hubs import TechnicHub from pybricks.pupdevices import Motor - from pybricks.parameters import Button, Color, Direction, Port, Stop + from pybricks.parameters import Button, Color, Direction, Port, Side, Stop from pybricks.robotics import DriveBase from pybricks.tools import wait, StopWatch