File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,15 @@ def _unmarshal(self, data: bytes):
278278obx_models_by_name : Dict [str , List [_Entity ]] = {}
279279
280280
281- def Entity (uid : int = 0 , model : str = "default" ) -> Callable [[Type ], _Entity ]:
282- """ Entity decorator that wraps _Entity to allow @Entity(id=, uid=); i.e. no class arguments. """
283-
284- def wrapper (class_ ):
281+ def Entity (uid : int = 0 , model : str = "default" ) -> _Entity :
282+ """
283+ Entity decorator for user classes using syntax ``@Entity([uid=])``
284+
285+ Wraps user classes and returns a ``_Entity`` wrapper.
286+ Use allow @Entity(id=, uid=); i.e. no class arguments.
287+ """
288+
289+ def wrapper (class_ ) -> Callable [[Type ], _Entity ]:
285290 # Also allow defining properties as class members; we'll instantiate them here
286291 class_members = inspect .getmembers (class_ , lambda a : (inspect .isclass (a ) and issubclass (a , Property )))
287292 for name , member_type in class_members :
You can’t perform that action at this time.
0 commit comments