MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _StringRelationshipArg

Class _StringRelationshipArg

lib/sqlalchemy/orm/relationships.py:298–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296
297@dataclasses.dataclass
298class _StringRelationshipArg(_RelationshipArg[_T1, _T2]):
299 def _resolve_against_registry(
300 self, clsregistry_resolver: Callable[[str, bool], _class_resolver]
301 ) -> None:
302 attr_value = self.argument
303
304 if callable(attr_value):
305 attr_value = attr_value()
306
307 if isinstance(attr_value, attributes.QueryableAttribute):
308 attr_value = attr_value.key # type: ignore
309
310 self.resolved = attr_value
311
312
313class _RelationshipArgs(NamedTuple):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected