Match a (name, type) declaration against this selector. This is used by NodeTemplate materialization where only a declared name/type is available (no live instance).
(self, *, name: str | None, cls: type | None)
| 64 | return self._match_target(SelectionTarget.from_obj(obj)) |
| 65 | |
| 66 | def match_declaration(self, *, name: str | None, cls: type | None) -> bool: |
| 67 | """Match a (name, type) declaration against this selector. |
| 68 | |
| 69 | This is used by NodeTemplate materialization where only a declared name/type is |
| 70 | available (no live instance). |
| 71 | """ |
| 72 | return self._match_target(SelectionTarget(name=name, cls=cls, obj=None)) |
| 73 | |
| 74 | def _match_target(self, target: SelectionTarget) -> bool: |
| 75 | if self._type_filter: |
no test coverage detected