| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
|
📝 Docs are deployed on https://ft-fix-generic--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
| def __class_getitem__(cls, item: Type[BaseDocument]): | ||
| def __class_getitem__(cls, item: Union[Type[BaseDocument], TypeVar, str]): | ||
| if not isinstance(item, type): | ||
| return Generic.__class_getitem__.__func__(cls, item) # type: ignore |
There was a problem hiding this comment.
How did you know this is what is required?
Sorry, something went wrong.
There was a problem hiding this comment.
is this even doing anything?
Sorry, something went wrong.
There was a problem hiding this comment.
is this even doing anything?
this is not doing anything else than checking the the item is valid Generic. I think it does not harm to keep it
Sorry, something went wrong.
There was a problem hiding this comment.
is this even doing anything?
this is not doing anything else than checking the the item is valid Generic. I think it does not harm to keep it
Crashed in Python 3.12.0
return Generic.__class_getitem__.__func__(cls, item) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'builtin_function_or_method' object has no attribute '__func__'. Did you mean: '__doc__'?
Sorry, something went wrong.
There was a problem hiding this comment.
Tried with pydantic generic model. Seems to work
Sorry, something went wrong.
Signed-off-by: 954 <510485871@qq.com>
Signed-off-by: 954 <510485871@qq.com> fix: judge based on Python version Signed-off-by: 954 <510485871@qq.com> fix: format for black Signed-off-by: 954 <510485871@qq.com>
Signed-off-by: 954 <510485871@qq.com>
Signed-off-by: 954 <510485871@qq.com>
| Back | FazBrowse Home | New Git URL |
Context
Make AbstractArray a generic compatbile with type var and string
fix this : #1146
this work now