Skip to content

Commit

Permalink
Run pre-commit hooks on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanielloNTIA committed Nov 7, 2024
1 parent e8568b8 commit 1661c6c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/rsa_api/rsa_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from enum import Enum
from os.path import abspath, join
from time import sleep
from typing import Any, Tuple, Union
from typing import Any, Union

import numpy as np

Expand Down Expand Up @@ -1016,7 +1016,7 @@ def DEVICE_Stop(self) -> None:
"""
self.err_check(self.rsa.DEVICE_Stop())

def DEVICE_GetEventStatus(self, event_id: str) -> Tuple[bool, int]:
def DEVICE_GetEventStatus(self, event_id: str) -> tuple[bool, int]:
"""
Return global device real-time event status.
Expand Down Expand Up @@ -1057,7 +1057,7 @@ def DEVICE_GetEventStatus(self, event_id: str) -> Tuple[bool, int]:

# IQ BLOCK METHODS

def IQBLK_GetIQAcqInfo(self) -> Tuple[int, int, int, int]:
def IQBLK_GetIQAcqInfo(self) -> tuple[int, int, int, int]:
"""
Return IQ acquisition status info for the most recent IQ block.
Expand Down Expand Up @@ -1133,7 +1133,7 @@ def IQBLK_GetIQData(self, req_length: int) -> np.ndarray:

def IQBLK_GetIQDataDeinterleaved(
self, req_length: int
) -> Tuple[np.ndarray, np.ndarray]:
) -> tuple[np.ndarray, np.ndarray]:
"""
Retrieve an IQ block data record in separate I and Q array format.
Expand Down Expand Up @@ -1316,7 +1316,7 @@ def IQSTREAM_ClearAcqStatus(self) -> None:
"""
self.err_check(self.rsa.IQSTREAM_ClearAcqStatus())

def IQSTREAM_GetAcqParameters(self) -> Tuple[float, float]:
def IQSTREAM_GetAcqParameters(self) -> tuple[float, float]:
"""
Retrieve the processing parameters of IQ streaming output bandwidth
and sample rate, resulting from the user's requested bandwidth.
Expand Down Expand Up @@ -1394,7 +1394,7 @@ def IQSTREAM_GetDiskFileInfo(self) -> _IQStreamFileInfo:
self.err_check(self.rsa.IQSTREAM_GetDiskFileInfo(byref(file_info)))
return file_info

def IQSTREAM_GetDiskFileWriteStatus(self) -> Tuple[bool, bool]:
def IQSTREAM_GetDiskFileWriteStatus(self) -> tuple[bool, bool]:
"""
Allow monitoring the progress of file output.
Expand Down Expand Up @@ -1430,7 +1430,7 @@ def IQSTREAM_GetEnable(self) -> bool:

def IQSTREAM_GetIQData(
self, dtype: str, buffer_size: int
) -> Tuple[np.ndarray, int, _IQStreamIQInfo]:
) -> tuple[np.ndarray, int, _IQStreamIQInfo]:
"""
Retrieve interleaved IQ data generated by IQ Stream processing.
Expand Down Expand Up @@ -1761,7 +1761,7 @@ def SPECTRUM_GetSettings(self) -> dict:

def SPECTRUM_GetTrace(
self, trace: str, max_trace_points: int
) -> Tuple[np.ndarray, int]:
) -> tuple[np.ndarray, int]:
"""
Return the spectrum trace data.
Expand Down Expand Up @@ -1825,7 +1825,7 @@ def SPECTRUM_GetTraceInfo(self) -> dict:
}
return info_dict

def SPECTRUM_GetTraceType(self, trace: str) -> Tuple[bool, str]:
def SPECTRUM_GetTraceType(self, trace: str) -> tuple[bool, str]:
"""
Query the trace settings.
Expand Down Expand Up @@ -2211,7 +2211,7 @@ def DEVICE_SearchAndConnect(self, verbose: bool = False) -> None:

def IQSTREAM_Tempfile_NoConfig(
self, duration_msec: int, return_status: bool = False
) -> Union[np.ndarray, Tuple[np.ndarray, str]]:
) -> Union[np.ndarray, tuple[np.ndarray, str]]:
"""
Retrieve IQ data from device by first writing to a tempfile.
Does not perform any device configuration: only captures data.
Expand Down Expand Up @@ -2304,7 +2304,7 @@ def IQSTREAM_Tempfile(
bw: Union[float, int],
duration_msec: int,
return_status: bool = False,
) -> Union[np.ndarray, Tuple[np.ndarray, str]]:
) -> Union[np.ndarray, tuple[np.ndarray, str]]:
"""
Retrieve IQ data from device by first writing to a tempfile.
Tunes device parameters before recording: center frequency,
Expand Down Expand Up @@ -2509,7 +2509,7 @@ def IQSTREAMIQInfo_StatusParser(

def SPECTRUM_Acquire(
self, trace: str = "Trace1", trace_points: int = 801, timeout_msec: int = 50
) -> Tuple[np.ndarray, int]:
) -> tuple[np.ndarray, int]:
"""
Acquire spectrum trace.
Expand Down Expand Up @@ -2567,7 +2567,7 @@ def IQBLK_Configure(

def IQBLK_Acquire(
self, rec_len: int = 1024, timeout_ms: int = 50
) -> Tuple[np.ndarray, np.ndarray]:
) -> tuple[np.ndarray, np.ndarray]:
"""
Acquire IQBLK data using IQBLK_GetIQDataDeinterleaved.
Expand Down Expand Up @@ -2637,7 +2637,7 @@ def DEVICE_GetTemperature(self, unit: str = "celsius") -> float:

def IQSTREAM_Acquire(
self, duration_msec: int, return_status: bool
) -> Union[np.ndarray, Tuple[np.ndarray, str]]:
) -> Union[np.ndarray, tuple[np.ndarray, str]]:
"""
Stream IQ data to a NumPy array.
Expand Down

0 comments on commit 1661c6c

Please sign in to comment.