diff --git a/artiq/coredevice/fastino.py b/artiq/coredevice/fastino.py index c5f297f74..72a6607c2 100644 --- a/artiq/coredevice/fastino.py +++ b/artiq/coredevice/fastino.py @@ -111,7 +111,7 @@ class Fastino: :param addr: Address to read from. :return: The data read. """ - raise NotImplementedError() + raise NotImplementedError # rtio_output(self.channel | addr | 0x80) # return rtio_input_data(self.channel >> 8) diff --git a/artiq/coredevice/grabber.py b/artiq/coredevice/grabber.py index d57db347b..cc254cf08 100644 --- a/artiq/coredevice/grabber.py +++ b/artiq/coredevice/grabber.py @@ -118,12 +118,12 @@ class Grabber: if timestamp == int64(-1): raise GrabberTimeoutException("Timeout before Grabber frame available") if sentinel != self.sentinel: - raise OutOfSyncException() + raise OutOfSyncException for i in range(len(data)): timestamp, roi_output = rtio_input_timestamped_data(timeout_mu, channel) if roi_output == self.sentinel: - raise OutOfSyncException() + raise OutOfSyncException if timestamp == int64(-1): raise GrabberTimeoutException( "Timeout retrieving ROIs (attempting to read more ROIs than enabled?)") diff --git a/artiq/examples/kc705_nist_clock/repository/tdr.py b/artiq/examples/kc705_nist_clock/repository/tdr.py index fa0776371..0a7380e14 100644 --- a/artiq/examples/kc705_nist_clock/repository/tdr.py +++ b/artiq/examples/kc705_nist_clock/repository/tdr.py @@ -81,6 +81,6 @@ class TDR(EnvExperiment): for i in range(len(self.t)): ti = self.ttl3.timestamp_mu(now_mu()) if ti <= int64(0): - raise PulseNotReceivedError() + raise PulseNotReceivedError self.t[i] = int32(int64(self.t[i]) + ti - t0) self.ttl3.count(now_mu()) # flush diff --git a/artiq/frontend/artiq_sinara_tester.py b/artiq/frontend/artiq_sinara_tester.py index 86843ecc4..f0c5d27a7 100755 --- a/artiq/frontend/artiq_sinara_tester.py +++ b/artiq/frontend/artiq_sinara_tester.py @@ -689,7 +689,7 @@ class SinaraTester(EnvExperiment): window=0x000, profiles=[1 for _ in range(len(osc))]) self.core.delay(1.*ms) else: - raise ValueError() + raise ValueError @kernel def phaser_led_wave(self, phasers: list[Phaser]): diff --git a/artiq/language/core.py b/artiq/language/core.py index 00cbae3a3..fd1818e3d 100644 --- a/artiq/language/core.py +++ b/artiq/language/core.py @@ -138,7 +138,7 @@ class Option(Generic[T]): def unwrap(self): if self.is_none(): - raise UnwrapNoneError() + raise UnwrapNoneError return self._nac3_option def __repr__(self) -> str: diff --git a/artiq/test/coredevice/test_portability.py b/artiq/test/coredevice/test_portability.py index 21f73000a..05988fcb2 100644 --- a/artiq/test/coredevice/test_portability.py +++ b/artiq/test/coredevice/test_portability.py @@ -140,7 +140,7 @@ class _NestedFinally(EnvExperiment): raise ValueError finally: try: - raise IndexError() + raise IndexError except ValueError: self._trace(0) except: @@ -166,7 +166,7 @@ class _NestedExceptions(EnvExperiment): raise finally: try: - raise IndexError() + raise IndexError except ValueError: self._trace(1) raise @@ -212,7 +212,7 @@ class _Exceptions(EnvExperiment): if i == 1: raise _MyException() elif i == 2: - raise IndexError() + raise IndexError except IndexError: self._trace(101) raise diff --git a/artiq/test/coredevice/test_rtio.py b/artiq/test/coredevice/test_rtio.py index 6c9969399..90024c15a 100644 --- a/artiq/test/coredevice/test_rtio.py +++ b/artiq/test/coredevice/test_rtio.py @@ -72,7 +72,7 @@ class RTT(EnvExperiment): self.ttl_inout.pulse(1*us) t1 = self.ttl_inout.timestamp_mu(now_mu()) if t1 < 0: - raise PulseNotReceived() + raise PulseNotReceived self.set_dataset("rtt", self.core.mu_to_seconds(t1 - t0)) @@ -96,7 +96,7 @@ class Loopback(EnvExperiment): self.loop_out.pulse(1*us) t1 = self.loop_in.timestamp_mu(now_mu()) if t1 < 0: - raise PulseNotReceived() + raise PulseNotReceived self.set_dataset("rtt", self.core.mu_to_seconds(t1 - t0)) @@ -257,7 +257,7 @@ class LoopbackGateTiming(EnvExperiment): in_mu = self.loop_in.timestamp_mu(gate_end_mu) print("timings: ", gate_start_mu, in_mu - lat_offset, gate_end_mu) if in_mu < 0: - raise PulseNotReceived() + raise PulseNotReceived if not (gate_start_mu <= (in_mu - lat_offset) <= gate_end_mu): raise IncorrectPulseTiming("Input event should occur during gate") if not (-2 < (in_mu - out_mu - loop_delay_mu) < 2): @@ -433,7 +433,7 @@ class HandoverException(EnvExperiment): def k(self, var): self.set_dataset(var, now_mu()) delay_mu(1234) - raise DummyException() + raise DummyException def run(self): try: