From 4c2e12eca1e08d89faac5b1264d70aa311423202 Mon Sep 17 00:00:00 2001 From: CPD Date: Wed, 12 Mar 2025 16:44:50 +0100 Subject: [PATCH] Revert "Add __str__ member" This reverts commit 2232a91f2e3f8cf449f243d5c4eb8f51d1cfc9e0. --- cpdctrl/led_control_device/base.py | 4 ---- cpdctrl/led_control_device/impl/test.py | 3 --- cpdctrl/led_control_device/impl/thorlabs_dc2200.py | 5 +---- cpdctrl/led_control_device/impl/thorlabs_ledd1b.py | 3 --- cpdctrl/voltage_measurement_device/base.py | 3 --- cpdctrl/voltage_measurement_device/impl/keithley2700.py | 2 -- cpdctrl/voltage_measurement_device/impl/test.py | 3 --- 7 files changed, 1 insertion(+), 22 deletions(-) diff --git a/cpdctrl/led_control_device/base.py b/cpdctrl/led_control_device/base.py index 85043ef..35a3e5d 100644 --- a/cpdctrl/led_control_device/base.py +++ b/cpdctrl/led_control_device/base.py @@ -42,8 +42,4 @@ class LedControlDevice(ABC): ------- None. """ - pass - - @abstractmethod - def __str__(self): pass \ No newline at end of file diff --git a/cpdctrl/led_control_device/impl/test.py b/cpdctrl/led_control_device/impl/test.py index 8be6770..2583431 100644 --- a/cpdctrl/led_control_device/impl/test.py +++ b/cpdctrl/led_control_device/impl/test.py @@ -12,6 +12,3 @@ class TestLedControlDevice(LedControlDevice): def set_level(self, level: int): pass - - def __str__(self): - return "Dummy Led Controller" \ No newline at end of file diff --git a/cpdctrl/led_control_device/impl/thorlabs_dc2200.py b/cpdctrl/led_control_device/impl/thorlabs_dc2200.py index 27c943f..7b78678 100644 --- a/cpdctrl/led_control_device/impl/thorlabs_dc2200.py +++ b/cpdctrl/led_control_device/impl/thorlabs_dc2200.py @@ -44,7 +44,4 @@ class DC2200(LedControlDevice): def connect_device(name): rm = pyvisa.ResourceManager() instr = rm.open_resource(name) - return DC2200(instr) - - def __str__(self): - return "Thorlabs DC2200" + return DC2200(instr) \ No newline at end of file diff --git a/cpdctrl/led_control_device/impl/thorlabs_ledd1b.py b/cpdctrl/led_control_device/impl/thorlabs_ledd1b.py index 5780de7..aec358b 100644 --- a/cpdctrl/led_control_device/impl/thorlabs_ledd1b.py +++ b/cpdctrl/led_control_device/impl/thorlabs_ledd1b.py @@ -45,9 +45,6 @@ class LEDD1B(LedControlDevice): else: raise ValueError(f"LEDD1B Led controller can only set 0% or 100%") - def __str__(self): - return "Thorlabs LEDD1B" - if __name__ == '__main__': led = LEDD1B() \ No newline at end of file diff --git a/cpdctrl/voltage_measurement_device/base.py b/cpdctrl/voltage_measurement_device/base.py index d2a8cd8..e90809e 100644 --- a/cpdctrl/voltage_measurement_device/base.py +++ b/cpdctrl/voltage_measurement_device/base.py @@ -50,7 +50,4 @@ class VoltageMeasurementDevice(ABC): None. """ - pass - @abstractmethod - def __str__(self): pass \ No newline at end of file diff --git a/cpdctrl/voltage_measurement_device/impl/keithley2700.py b/cpdctrl/voltage_measurement_device/impl/keithley2700.py index ec1a6c2..51ddbe7 100644 --- a/cpdctrl/voltage_measurement_device/impl/keithley2700.py +++ b/cpdctrl/voltage_measurement_device/impl/keithley2700.py @@ -256,5 +256,3 @@ class Keithley2700(VoltageMeasurementDevice): instr = rm.open_resource(name) return Keithley2700(instr) - def __str__(self): - return "Keithley 2700" diff --git a/cpdctrl/voltage_measurement_device/impl/test.py b/cpdctrl/voltage_measurement_device/impl/test.py index 6ce01fd..a7013d7 100644 --- a/cpdctrl/voltage_measurement_device/impl/test.py +++ b/cpdctrl/voltage_measurement_device/impl/test.py @@ -52,6 +52,3 @@ class TestVoltageMeasurementDevice(VoltageMeasurementDevice): """ pass - - def __str__(self): - return "Simulated Voltage Measurement Device"