| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
| elif ( | ||
| isinstance(field_type, _GenericAlias) | ||
| and field_type.__origin__ is list | ||
| ): |
There was a problem hiding this comment.
I am wondering if this will work with newer python version where you can pass list instead of List as a valid type hint ?
Sorry, something went wrong.
There was a problem hiding this comment.
what Python version are u referring to?
Sorry, something went wrong.
There was a problem hiding this comment.
in python 3.9 you can do
class A:
b: list[inŧ]instead of
class A:
b: List[int]I am almost sure they have maintain compatibility with older version but the fact that we are using a private object from the typing library tell me that we are not 100% sure we will support this new way.
Maybe there is a way not to use the _GenericAlias since it is private ?
Sorry, something went wrong.
There was a problem hiding this comment.
Oh actually we can use
from typing_inspect import is_generic_typewe already rely on this library for some type hint things and they make sure that their function are compatible with every python version
Sorry, something went wrong.
There was a problem hiding this comment.
can u propose a PR on top of mine to do this? I am not sure what u are intending to tell. I did trial and error until I found the working formula
Sorry, something went wrong.
There was a problem hiding this comment.
I pushed a commit
Sorry, something went wrong.
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
|
📝 Docs are deployed on https://ft-feat-reduce-v2--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Goals:
Implement reduce methods in utils