diff --git a/src/ophyd_async/core/_log.py b/src/ophyd_async/core/_log.py index cf015de95..af372de96 100644 --- a/src/ophyd_async/core/_log.py +++ b/src/ophyd_async/core/_log.py @@ -137,4 +137,4 @@ def config_ophyd_async_logging( handler.close() -set_handler = config_ophyd_async_logging # for back-compat +set_handler = config_ophyd_async_logging # for back-compact diff --git a/src/ophyd_async/core/_mock_signal_utils.py b/src/ophyd_async/core/_mock_signal_utils.py index 33c0f677b..da01cd261 100644 --- a/src/ophyd_async/core/_mock_signal_utils.py +++ b/src/ophyd_async/core/_mock_signal_utils.py @@ -54,7 +54,7 @@ def reset_mock_put_calls(signal: Signal): class _SetValuesIterator: # Garbage collected by the time __del__ is called unless we put it as a - # global attrbute here. + # global attribute here. require_all_consumed: bool = False def __init__( @@ -74,7 +74,7 @@ def __iter__(self): return self def __next__(self): - # Will propogate StopIteration + # Will propagate StopIteration self.index, next_value = next(self.iterator) set_mock_value(self.signal, next_value) return next_value @@ -85,7 +85,7 @@ def __del__(self): # require_all_consumed=True, we can therefore assume they # supplied a finite list. # In the case of require_all_consumed=False, an infinite - # iterble is permitted + # iterable is permitted values = list(self.values) if self.index != len(values): # Report the values consumed and the values yet to be diff --git a/src/ophyd_async/epics/adpilatus/_pilatus_controller.py b/src/ophyd_async/epics/adpilatus/_pilatus_controller.py index 9e8bd54ae..6c2390b7b 100644 --- a/src/ophyd_async/epics/adpilatus/_pilatus_controller.py +++ b/src/ophyd_async/epics/adpilatus/_pilatus_controller.py @@ -51,7 +51,7 @@ async def arm(self): self._drv ) # The pilatus has an additional PV that goes True when the camserver - # is actually ready. Should wait for that too or we risk dropping + # is actually ready. Should wait for that too, or we risk dropping # a frame await wait_for_value( self._drv.armed, diff --git a/src/ophyd_async/epics/signal/_aioca.py b/src/ophyd_async/epics/signal/_aioca.py index bdac6d878..90ce83cd5 100644 --- a/src/ophyd_async/epics/signal/_aioca.py +++ b/src/ophyd_async/epics/signal/_aioca.py @@ -59,7 +59,7 @@ def _data_key_from_augmented_value( value fields by DBR type. Args: - value (AugmentedValue): Description of the the return type of a DB record + value (AugmentedValue): Description of the return type of DB record choices: Optional list of enum choices to pass as metadata in the datakey dtype: Optional override dtype when AugmentedValue is ambiguous, e.g. booleans diff --git a/src/ophyd_async/plan_stubs/_fly.py b/src/ophyd_async/plan_stubs/_fly.py index a9f0003de..6435d683a 100644 --- a/src/ophyd_async/plan_stubs/_fly.py +++ b/src/ophyd_async/plan_stubs/_fly.py @@ -188,7 +188,7 @@ def time_resolved_fly_and_collect_with_static_seq_table( - Declare the stream and kickoff the scan - Collect while completing - This needs to be used in a plan that instantates detectors and a flyer, + This needs to be used in a plan that instantiates detectors and a flyer, stages/unstages the devices, and opens and closes the run. """ diff --git a/system_tests/epics/eiger/test_eiger_system.py b/system_tests/epics/eiger/test_eiger_system.py index 8d20c1a70..6a82521da 100644 --- a/system_tests/epics/eiger/test_eiger_system.py +++ b/system_tests/epics/eiger/test_eiger_system.py @@ -81,7 +81,7 @@ async def test_trigger_saves_file(test_eiger: EigerDetector, setup_device: Setup await test_eiger.stage() await test_eiger.prepare(single_shot) # Need to work out what the hold up is in prepare so we cant do this straight away. - # File path propogation? + # File path propagation? await asyncio.sleep(0.5) await setup_device.trigger.set(1) await asyncio.sleep(0.5) # Need to work out when it's actually finished writing diff --git a/tests/core/test_flyer.py b/tests/core/test_flyer.py index b9a318613..3c3836608 100644 --- a/tests/core/test_flyer.py +++ b/tests/core/test_flyer.py @@ -188,7 +188,7 @@ def flying_plan(): yield from bps.complete(detector, wait=False, group="complete") assert flyer._trigger_logic.state == TriggerState.null - # Manually incremenet the index as if a frame was taken + # Manually increment the index as if a frame was taken for detector in detectors: detector.writer.index += 1 diff --git a/tests/core/test_log.py b/tests/core/test_log.py index 41c63be4d..fc6a3c76f 100644 --- a/tests/core/test_log.py +++ b/tests/core/test_log.py @@ -36,7 +36,7 @@ def test_config_ophyd_async_logging_with_file_handler(tmp_path): def test_config_ophyd_async_logging_removes_extra_handlers(): - # Protect global variable in other pytests + # Protect global variable in other pytest's class FakeLogger: def __init__(self): self.handlers = [] diff --git a/tests/core/test_mock_signal_backend.py b/tests/core/test_mock_signal_backend.py index b0ac8012b..e1ca554c4 100644 --- a/tests/core/test_mock_signal_backend.py +++ b/tests/core/test_mock_signal_backend.py @@ -29,7 +29,7 @@ async def test_mock_signal_backend(connect_mock_mode): mock_signal = SignalRW(MockSignalBackend(datatype=str)) # If mock is false it will be handled like a normal signal, otherwise it will - # initalize a new backend from the one in the line above + # initialize a new backend from the one in the line above await mock_signal.connect(mock=connect_mock_mode) assert isinstance(mock_signal._backend, MockSignalBackend) @@ -319,7 +319,7 @@ async def test_reset_mock_put_calls(mock_signals): with pytest.raises(AssertionError) as exc: get_mock_put(signal1).assert_called_with("test_value", wait=ANY, timeout=ANY) # Replacing spaces because they change between runners - # (e.g the github actions runner has more) + # (e.g. the GitHub actions runner has more) assert str(exc.value).replace(" ", "").replace("\n", "") == ( "expectedcallnotfound." "Expected:put('test_value',wait=,timeout=)" diff --git a/tests/core/test_signal.py b/tests/core/test_signal.py index 133cfd5ee..3ea829028 100644 --- a/tests/core/test_signal.py +++ b/tests/core/test_signal.py @@ -256,7 +256,7 @@ async def test_wait_for_value_with_value(): assert 0.2 < await t < 1.0 -async def test_wait_for_value_with_funcion(): +async def test_wait_for_value_with_function(): signal = epics_signal_rw(float, read_pv="pva://signal", name="signal") await signal.connect(mock=True) set_mock_value(signal, 45.8) @@ -318,7 +318,7 @@ async def test_assert_value(mock_signal: SignalRW): await assert_value(mock_signal, 168) -async def test_assert_reaading(mock_signal: SignalRW): +async def test_assert_reading(mock_signal: SignalRW): set_mock_value(mock_signal, 888) dummy_reading = { "mock_signal": Reading({"alarm_severity": 0, "timestamp": ANY, "value": 888}) @@ -326,7 +326,7 @@ async def test_assert_reaading(mock_signal: SignalRW): await assert_reading(mock_signal, dummy_reading) -async def test_failed_assert_reaading(mock_signal: SignalRW): +async def test_failed_assert_reading(mock_signal: SignalRW): set_mock_value(mock_signal, 888) dummy_reading = { "mock_signal": Reading({"alarm_severity": 0, "timestamp": ANY, "value": 88}) diff --git a/tests/core/test_subset_enum.py b/tests/core/test_subset_enum.py index 3512075e7..d60a45ccd 100644 --- a/tests/core/test_subset_enum.py +++ b/tests/core/test_subset_enum.py @@ -87,6 +87,6 @@ async def test_runtime_enum_signal(): assert await signal_rw_ca.get_value() == "B2" # Will accept string values even if they're not in the runtime enum - # Though type checking should compain + # Though type checking should complain await signal_rw_pva.set("C1") # type: ignore await signal_rw_ca.set("C2") # type: ignore diff --git a/tests/epics/adaravis/test_aravis.py b/tests/epics/adaravis/test_aravis.py index 341ad280e..932630e85 100644 --- a/tests/epics/adaravis/test_aravis.py +++ b/tests/epics/adaravis/test_aravis.py @@ -80,7 +80,7 @@ async def test_can_read(test_adaravis: adaravis.AravisDetector): assert (await test_adaravis.read()) == {} -async def test_decribe_describes_writer_dataset( +async def test_describe_describes_writer_dataset( test_adaravis: adaravis.AravisDetector, one_shot_trigger_info: TriggerInfo ): set_mock_value(test_adaravis._writer.hdf.file_path_exists, True) diff --git a/tests/epics/advimba/test_vimba.py b/tests/epics/advimba/test_vimba.py index a8990502c..1fa6e3881 100644 --- a/tests/epics/advimba/test_vimba.py +++ b/tests/epics/advimba/test_vimba.py @@ -125,7 +125,7 @@ async def test_can_collect( assert stream_datum["indices"] == {"start": 0, "stop": 1} -async def test_can_decribe_collect( +async def test_can_describe_collect( test_advimba: advimba.VimbaDetector, one_shot_trigger_info: TriggerInfo ): set_mock_value(test_advimba._writer.hdf.file_path_exists, True) diff --git a/tests/epics/pvi/test_pvi.py b/tests/epics/pvi/test_pvi.py index caa946852..5b2a9e906 100644 --- a/tests/epics/pvi/test_pvi.py +++ b/tests/epics/pvi/test_pvi.py @@ -186,7 +186,7 @@ async def test_device_create_children_from_annotations_with_device_vectors( block_1_device = device.device block_2_device_vector = device.device_vector - # create_children_from_annotiations should have made DeviceVectors + # create_children_from_annotations should have made DeviceVectors # and an optional Block, but no signals assert hasattr(device, "device_vector") assert not hasattr(device, "signal_rw") diff --git a/tests/fastcs/panda/test_hdf_panda.py b/tests/fastcs/panda/test_hdf_panda.py index 41f50d648..dfc4a4a27 100644 --- a/tests/fastcs/panda/test_hdf_panda.py +++ b/tests/fastcs/panda/test_hdf_panda.py @@ -115,7 +115,7 @@ def flying_plan(): yield from bps.complete(flyer, wait=False, group="complete") yield from bps.complete(mock_hdf_panda, wait=False, group="complete") - # Manually incremenet the index as if a frame was taken + # Manually increment the index as if a frame was taken set_mock_value(mock_hdf_panda.data.num_captured, 1) set_mock_value(flyer.trigger_logic.seq.active, 0) @@ -232,7 +232,7 @@ def flying_plan(): yield from bps.complete(flyer, wait=False, group="complete") yield from bps.complete(mock_hdf_panda, wait=False, group="complete") - # Manually incremenet the index as if a frame was taken + # Manually increment the index as if a frame was taken set_mock_value(mock_hdf_panda.data.num_captured, 1) set_mock_value(flyer.trigger_logic.seq.active, 0) diff --git a/tests/plan_stubs/test_fly.py b/tests/plan_stubs/test_fly.py index 866ee5763..c47e1f3fe 100644 --- a/tests/plan_stubs/test_fly.py +++ b/tests/plan_stubs/test_fly.py @@ -279,7 +279,7 @@ def flying_plan(): for detector in detector_list: yield from bps.complete(detector, wait=False, group="complete") - # Manually incremenet the index as if a frame was taken + # Manually increment the index as if a frame was taken for detector in detector_list: detector.writer.increment_index() diff --git a/tests/sim/test_streaming_plan.py b/tests/sim/test_streaming_plan.py index 222f92d68..ea6de3b90 100644 --- a/tests/sim/test_streaming_plan.py +++ b/tests/sim/test_streaming_plan.py @@ -8,7 +8,7 @@ from ophyd_async.sim.demo import PatternDetector -# NOTE the async operations with h5py are non-trival +# NOTE the async operations with h5py are non-trivial # because of lack of native support for async operations # see https://github.com/h5py/h5py/issues/837 async def test_streaming_plan(RE: RunEngine, sim_pattern_detector: PatternDetector):