Skip to content

Commit

Permalink
Fix pre-commit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
callumforrester committed Aug 9, 2024
1 parent 69f61f7 commit cb9454b
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
"type": "shell"
}
]
}
}
1 change: 0 additions & 1 deletion docs/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@
{%- endfor %}
{% endif %}
{% endblock %}

1 change: 0 additions & 1 deletion docs/how-to/create-beamline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,3 @@ The following example creates a fictitious beamline ``w41``, with a simulated tw
This test checks that the function returns a type that conforms to Bluesky protocols,
that it always returns the same instance of the device and that the arguments passed
into the Device class constructor are valid.

2 changes: 1 addition & 1 deletion docs/how-to/make-new-ophyd-async-device.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ Additional Notes
- ``with self.add_children_as_readables():`` Ensure this context manager is used appropriately in the device implementation to add child components as readable properties, but not Movables.


.. _ophyd-async: https://blueskyproject.io/ophyd-async/main/how-to/choose-interfaces-for-devices.html
.. _ophyd-async: https://blueskyproject.io/ophyd-async/main/how-to/choose-interfaces-for-devices.html
2 changes: 1 addition & 1 deletion docs/how-to/zocalo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ processing from data in ISPyB.

Results are received using the ``ZocaloResults`` device, so that they can be read into a plan and used for
decision-making. Currently the ``ZocaloResults`` device is only made to handle X-ray centring results. It subscribes to
a given zocalo RabbitMQ channel the first time that it is triggered.
a given zocalo RabbitMQ channel the first time that it is triggered.
2 changes: 1 addition & 1 deletion docs/images/excalidraw-example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/device-standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ Ophyd Devices best practices
Ophyd-async directory contains a flowchart_ for a simplified decision tree about what interfaces
should a given device implement.

.. _flowchart: https://blueskyproject.io/ophyd-async/main/how-to/choose-interfaces-for-devices.html
.. _flowchart: https://blueskyproject.io/ophyd-async/main/how-to/choose-interfaces-for-devices.html
2 changes: 1 addition & 1 deletion docs/reference/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ Docs follow the underlining convention::

.. seealso::

How-to guide `../how-to/build-docs`
How-to guide `../how-to/build-docs`
2 changes: 1 addition & 1 deletion docs/tutorials/get_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ If you would like to only log to graylog/file exlusively there are helper functi

.. _ophyd: https://nsls-ii.github.io/ophyd/
.. _bluesky: https://blueskyproject.io/bluesky/
.. _graylog: https://graylog-log-target.diamond.ac.uk/search
.. _graylog: https://graylog-log-target.diamond.ac.uk/search
4 changes: 2 additions & 2 deletions src/dodal/devices/aperturescatterguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class SelectedAperture(SignalR):
async def read(self, *args, **kwargs):
assert isinstance(self.parent, ApertureScatterguard)
assert self._backend
await self._backend.put(await self.parent._get_current_aperture_position())
await self._backend.put(await self.parent.get_current_aperture_position())
return {self.name: await self._backend.get_reading()}

async def describe(self) -> dict[str, DataKey]:
Expand Down Expand Up @@ -224,7 +224,7 @@ async def _set_raw_unsafe(self, positions: ApertureFiveDimensionalLocation):
self.scatterguard.y.set(scatterguard_y),
)

async def _get_current_aperture_position(self) -> SingleAperturePosition:
async def get_current_aperture_position(self) -> SingleAperturePosition:
"""
Returns the current aperture position using readback values
for SMALL, MEDIUM, LARGE. ROBOT_LOAD position defined when
Expand Down
2 changes: 1 addition & 1 deletion src/dodal/devices/areadetector/adutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def trigger(self):

def _acq_done(*args, **kwargs):
# TODO sort out if anything useful in here
self._status._finished()
self._status.set_finished()

Check warning on line 34 in src/dodal/devices/areadetector/adutils.py

View check run for this annotation

Codecov / codecov/patch

src/dodal/devices/areadetector/adutils.py#L34

Added line #L34 was not covered by tests

self._acquisition_signal.put(1, use_complete=True, callback=_acq_done)
# Ensure that this mixin is part of valid Detector with generate_datum
Expand Down
2 changes: 1 addition & 1 deletion src/dodal/devices/oav/microns_for_zoom_levels.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"micronsPerXPixel": 0.227,
"micronsPerYPixel": 0.314
}
}
}
2 changes: 1 addition & 1 deletion tests/common/test_coordination.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_group_uid(group: str):


def test_type_checking_ignores_inject():
def example_function(x: Movable = inject("foo")) -> MsgGenerator:
def example_function(x: Movable = inject("foo")) -> MsgGenerator: # noqa: B008
yield from {}

# These asserts are sanity checks
Expand Down
2 changes: 1 addition & 1 deletion tests/devices/unit_tests/test_OAVCentring.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@
"CannyEdgeLowerThreshold": 5.0,
"brightness": 90
}
}
}
Loading

0 comments on commit cb9454b

Please sign in to comment.