From e1b3257d9d5d3187b0530f0b49355ef792be6604 Mon Sep 17 00:00:00 2001 From: Shashank P <142999380+u625355@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:36:31 +0530 Subject: [PATCH] fix: updated tekhsi_connect.py by removing multiple import errors. Removed duplicate imports. Prefixed unused term for unused global variables. Signed-off-by: Shashank P <142999380+u625355@users.noreply.github.com> --- src/tekhsi/tek_hsi_connect.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tekhsi/tek_hsi_connect.py b/src/tekhsi/tek_hsi_connect.py index d391935..8702f9e 100644 --- a/src/tekhsi/tek_hsi_connect.py +++ b/src/tekhsi/tek_hsi_connect.py @@ -7,7 +7,6 @@ from atexit import register from enum import Enum -from contextlib import contextmanager from typing import List, Optional, Dict @@ -214,7 +213,7 @@ def verbose(self, value: bool): ################################################################################################ # Context Manager Methods ################################################################################################ - @contextmanager + @contextlib.contextmanager def access_data(self, on: AcqWaitOn = AcqWaitOn.NewData, after: float = -1): """Grants access to data. @@ -650,7 +649,7 @@ def _read_waveform(self, header: WaveformHeader): ) sample_index = 0 - data_size = header.sourcewidth + unused_data_size = header.sourcewidth request = WaveformRequest(sourcename=header.sourcename, chunksize=self.chunksize) response_iterator = self.native.GetWaveform(request) dt = None