MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / __getattr__

Method __getattr__

mongoengine/fields.py:1694–1710  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

1692 self.gridout = None
1693
1694 def __getattr__(self, name):
1695 attrs = (
1696 "_fs",
1697 "grid_id",
1698 "key",
1699 "instance",
1700 "db_alias",
1701 "collection_name",
1702 "newfile",
1703 "gridout",
1704 )
1705 if name in attrs:
1706 return self.__getattribute__(name)
1707 obj = self.get()
1708 if hasattr(obj, name):
1709 return getattr(obj, name)
1710 raise AttributeError
1711
1712 def __get__(self, instance, value):
1713 return self

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
__getattribute__Method · 0.80

Tested by

no test coverage detected