MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __call__

Method __call__

lib/sqlalchemy/orm/clsregistry.py:584–599  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

582 return rval
583
584 def __call__(self) -> Any:
585 if self.tables_only:
586 try:
587 return self._dict[self.arg]
588 except KeyError as k:
589 self._raise_for_name(self.arg, k)
590 else:
591 try:
592 x = eval(self.arg, globals(), self._dict)
593
594 if isinstance(x, _GetColumns):
595 return x.cls
596 else:
597 return x
598 except NameError as n:
599 self._raise_for_name(n.args[0], n)
600
601
602_fallback_dict: Mapping[str, Any] = None # type: ignore

Callers

nothing calls this directly

Calls 1

_raise_for_nameMethod · 0.95

Tested by

no test coverage detected