Skip to contentSkip to conversation

support/testing/tests/package/sample_gst1_python.py: fix flake8 errors

PATCH New aduskett at gmail.com 2 participants 2 messages Mar 28, 2020 – Mar 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/testing/tests/package/sample_gst1_python.py: fix flake8 errors

From: Adam Duskett <[email protected]>

The older version of flake8 on the autobuilders does not support typehints. As such, flake8 throws the following error when scanning sample_gst1_python:
E999 SyntaxError: invalid syntax

Remove the typehinting from on_message to fix this issue.

---
 support/testing/tests/package/sample_gst1_python.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/package/sample_gst1_python.py +1 -1
index d8cd3fb422..fab7e74f40 100644
@@ -8,7 +8,7 @@ gi.require_version('Gst', '1.0')
 from gi.repository import Gst, GLib  # noqa: E402
 
 
-def on_message(bus: Gst.Bus, message: Gst.Message, loop: GLib.MainLoop):
+def on_message(bus, message, loop):
     print('Received Gst.Message.type: {}'.format(message.type))
     if message.type == Gst.MessageType.EOS:
         loop.quit()
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 support/testing/tests/package/sample_gst1_python.py: fix flake8 errors

Quoted 6 lines · On Sat, 28 Mar 2020 14:26:50 -0700 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

The older version of flake8 on the autobuilders does not support typehints. As such, flake8 throws the following error when scanning sample_gst1_python:
E999 SyntaxError: invalid syntax

Quoted 6 lines

Remove the typehinting from on_message to fix this issue.

---
 support/testing/tests/package/sample_gst1_python.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com