From 942834ed8026391c9c0cc47505ad215f83145d48 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 28 Mar 2023 13:35:35 +1300 Subject: [PATCH] workflows: check pycodestyle (previously pep8) Signed-off-by: Julian Oes --- .github/workflows/main.yml | 6 ++++++ examples/camera_params.py | 2 +- examples/telemetry.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a98befae..89df71a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,12 @@ jobs: - name: Install pip run: sudo apt-get install -y python3-pip + - name: Check style + run: | + python3 -m pip install pycodestyle + export PATH=$PATH:$HOME/.local/bin + pycodestyle examples/* + - name: Install prerequisites run: | python3 -m pip install -r requirements.txt -r requirements-dev.txt -r requirements-docs.txt diff --git a/examples/camera_params.py b/examples/camera_params.py index a620d8b8..5b3fc0e1 100755 --- a/examples/camera_params.py +++ b/examples/camera_params.py @@ -28,7 +28,7 @@ async def run(): asyncio.ensure_future(observe_camera_mode(drone)) asyncio.ensure_future(observe_possible_setting_options(drone)) - while(True): + while True: entered_input = await ainput(usage_str) if (entered_input == "p"): diff --git a/examples/telemetry.py b/examples/telemetry.py index a4a7fcd4..7fa831f7 100755 --- a/examples/telemetry.py +++ b/examples/telemetry.py @@ -7,7 +7,7 @@ async def run(): # Init the drone drone = System() - await drone.connect() + await drone.connect(system_address="udp://:14540") # Start the tasks asyncio.ensure_future(print_battery(drone))