Skip to content
Snippets Groups Projects
Commit 2436d75e authored by Kien Le's avatar Kien Le
Browse files

Fix type hint

parent e5156057
No related branches found
No related tags found
1 merge request!139Change the way RT130 data is read for better performance
import dataclasses import dataclasses
from typing import Any from typing import Any, Tuple
from sohstationviewer.model.mseed_data.record_reader_helper import Unpacker from sohstationviewer.model.mseed_data.record_reader_helper import Unpacker
from sohstationviewer.model.reftek.reftek_data.header import PacketHeader from sohstationviewer.model.reftek.reftek_data.header import PacketHeader
...@@ -80,7 +80,7 @@ def decode_compressed(packet: bytes, data_format: str, unpacker: Unpacker ...@@ -80,7 +80,7 @@ def decode_compressed(packet: bytes, data_format: str, unpacker: Unpacker
def read_dt_packet(packet: bytes, unpacker: Unpacker def read_dt_packet(packet: bytes, unpacker: Unpacker
) -> tuple[DTExtendedHeader, Any]: ) -> Tuple[DTExtendedHeader, Any]:
""" """
Process a DT packet and get its extended header and first data point. Process a DT packet and get its extended header and first data point.
:param packet: the bytes that make up the given DT packet. :param packet: the bytes that make up the given DT packet.
......
...@@ -9,6 +9,8 @@ Suggested updates to obspy.io.reftek.packet: ...@@ -9,6 +9,8 @@ Suggested updates to obspy.io.reftek.packet:
Maeva Pourpoint IRIS/PASSCAL Maeva Pourpoint IRIS/PASSCAL
""" """
from typing import List
import numpy import numpy
import obspy.io.reftek.packet as obspy_rt130_packet import obspy.io.reftek.packet as obspy_rt130_packet
...@@ -127,7 +129,7 @@ class EHPacket(obspy_rt130_packet.EHPacket): ...@@ -127,7 +129,7 @@ class EHPacket(obspy_rt130_packet.EHPacket):
"\n\t".join(info)) "\n\t".join(info))
return info return info
def eh_et_info(self, nbr_DT_samples: int) -> list[str]: def eh_et_info(self, nbr_DT_samples: int) -> List[str]:
""" """
Compile EH and ET info to write to log file. Compile EH and ET info to write to log file.
Returns list of strings. Returns list of strings.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment