From 1661c6cbc8fb74740862972a807e0be9155f3682 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:28:54 -0500 Subject: [PATCH] Run pre-commit hooks on all files --- src/rsa_api/rsa_api.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/rsa_api/rsa_api.py b/src/rsa_api/rsa_api.py index 0231f90..d4df736 100644 --- a/src/rsa_api/rsa_api.py +++ b/src/rsa_api/rsa_api.py @@ -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 @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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, @@ -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. @@ -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. @@ -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.