fixed a lot of Ruff errors and incorrect Accumulation returns in the overloaded operators
Build Debian Packages / build (bookworm, debian12) (push) Successful in 8m0s
Build Debian Packages / build (bullseye, debian11) (push) Successful in 7m14s
Build Debian Packages / build (trixie, debian13) (push) Has been cancelled

This commit is contained in:
2026-03-19 13:03:25 +01:00
parent df34447ef2
commit a591dfc161
9 changed files with 45 additions and 38 deletions
+7 -3
View File
@@ -7,7 +7,6 @@ from .DamarisFFT import DamarisFFT
import threading
import numpy
import sys
import types
import datetime
import tables
#############################################################################
@@ -69,8 +68,10 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
print("Warning ADC-Result: Tried to run \"create_data_space()\" more than once.")
return
if channels <= 0: raise ValueError("ValueError: You cant create an ADC-Result with less than 1 channel!")
if samples <= 0: raise ValueError("ValueError: You cant create an ADC-Result with less than 1 sample!")
if channels <= 0:
raise ValueError("ValueError: You cant create an ADC-Result with less than 1 channel!")
if samples <= 0:
raise ValueError("ValueError: You cant create an ADC-Result with less than 1 sample!")
for i in range(channels):
self.y.append(numpy.zeros((samples,), dtype="int16"))
@@ -398,6 +399,8 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
r = ADC_Result(x = self.x[:], y = tmp_y, index = self.index[:], sampl_freq = self.sampling_rate, desc = self.description, job_id = self.job_id, job_date = self.job_date)
self.lock.release()
return r
else:
raise ValueError("ValueError: Cannot multiply \"%s\" to ADC-Result!") % str(other.__class__)
@@ -450,6 +453,7 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
r = ADC_Result(x = self.x[:], y = tmp_y, index = self.index[:], sampl_freq = self.sampling_rate, desc = self.description, job_id = self.job_id, job_date = self.job_date)
self.lock.release()
return r
else:
raise ValueError("ValueError: Cannot multiply \"%s\" to ADC-Result!") % str(other.__class__)