Skip to content

Commit

Permalink
Make type-checking happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuck99 committed Jan 7, 2025
1 parent 4db1562 commit 8096af2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/dodal/common/beamlines/beamline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from dodal.utils import (
AnyDevice,
BeamlinePrefix,
D,
DeviceInitializationController,
SkipType,
skip_device,
Expand Down Expand Up @@ -141,8 +140,8 @@ def device_factory(
SkipType,
"mark the factory to be (conditionally) skipped when beamline is imported by external program",
] = False,
) -> Callable[[Callable[[], D]], DeviceInitializationController[D]]:
def decorator(factory: Callable[[], D]) -> DeviceInitializationController[D]:
) -> Callable[[Callable[[], T]], DeviceInitializationController[T]]:
def decorator(factory: Callable[[], T]) -> DeviceInitializationController[T]:
return DeviceInitializationController(
factory,
use_factory_name,
Expand Down
2 changes: 1 addition & 1 deletion src/dodal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def __call__(
)
else:
assert is_v1_device_type(type(device))
device.wait_for_connection(timeout=timeout)
device.wait_for_connection(timeout=timeout) # type: ignore

if name:
device.set_name(name)
Expand Down

0 comments on commit 8096af2

Please sign in to comment.