MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _inspect_mc

Function _inspect_mc

lib/sqlalchemy/orm/util.py:1529–1540  ·  view source on GitHub ↗
(
    class_: Type[_O],
)

Source from the content-addressed store, hash-verified

1527
1528@inspection._inspects(type)
1529def _inspect_mc(
1530 class_: Type[_O],
1531) -> Optional[Mapper[_O]]:
1532 try:
1533 class_manager = opt_manager_of_class(class_)
1534 if class_manager is None or not class_manager.is_mapped:
1535 return None
1536 mapper = class_manager.mapper
1537 except orm_exc.NO_STATE:
1538 return None
1539 else:
1540 return mapper
1541
1542
1543GenericAlias = type(List[Any])

Callers 1

_inspect_generic_aliasFunction · 0.85

Calls 1

opt_manager_of_classFunction · 0.85

Tested by

no test coverage detected