Skip to content

Commit 8786c79

Browse files
committed
Moved filling ignored_signals to _scan_for_annotations
1 parent f230632 commit 8786c79

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/ophyd_async/core/_device_filler.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ def __init__(
7676
self._extras: dict[UniqueName, Sequence[Any]] = {}
7777
self._signal_datatype: dict[LogicalName, type | None] = {}
7878
self._vector_device_type: dict[LogicalName, type[Device] | None] = {}
79-
self.ignored_signals: set[str] = {
80-
name
81-
for name, type_annotation in device.__annotations__.items()
82-
if type_annotation is Ignore
83-
}
79+
self.ignored_signals: set[str] = set()
8480
# Backends and Connectors stored ready for the connection phase
8581
self._unfilled_backends: dict[
8682
LogicalName, tuple[SignalBackendT, type[Signal]]
@@ -121,6 +117,8 @@ def _scan_for_annotations(self):
121117
# Get hints with Annotated for wrapping signals and backends
122118
extra_hints = get_type_hints(cls, include_extras=True)
123119
for attr_name, annotation in hints.items():
120+
if annotation is Ignore:
121+
self.ignored_signals.add(attr_name)
124122
name = UniqueName(attr_name)
125123
origin = get_origin_class(annotation)
126124
if (

0 commit comments

Comments
 (0)