parser typing

This commit is contained in:
Jakob Ketterl
2021-09-28 00:27:01 +02:00
parent 757ec01ea4
commit 25e2a8013e
4 changed files with 19 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
from owrx.audio import AudioChopperProfile, ConfigWiredProfileSource
from owrx.audio.chopper import AudioChopperParser
import re
from js8py import Js8
from js8py.frames import Js8FrameHeartbeat, Js8FrameCompound
@@ -81,10 +82,10 @@ class Js8TurboProfile(Js8Profile):
return "C"
class Js8Parser:
class Js8Parser(AudioChopperParser):
decoderRegex = re.compile(" ?<Decode(Started|Debug|Finished)>")
def parse(self, profile, freq, raw_msg):
def parse(self, profile: AudioChopperProfile, freq: int, raw_msg: bytes):
try:
band = None
if freq is not None: