You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
return Generic.__class_getitem__.__func__(cls, item) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'builtin_function_or_method' object has no attribute '__func__'. Did you mean: '__doc__'?
def__class_getitem__(cls, item: Union[Type[BaseDocument], TypeVar, str]):
ifnotisinstance(item, type):
try:
returnGeneric.__class_getitem__.__func__(cls, item) # type: ignore# this do nothing that checking that item is valid type var or str# Keep the approach in #1147 to be compatible with lower versions of Python.exceptAttributeError:
fromtypesimportGenericAliasreturnGenericAlias(cls, item) # type: ignore
Activity
JoanFM commentedon Dec 22, 2023
hey @954-Ivory , would you be able to do a PR with the fix?
954-Ivory commentedon Dec 22, 2023
Yes, completed.