| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Codecov ReportPatch coverage: 100.00% and project coverage change: +0.01% 🎉 Additional details and impacted files @@ Coverage Diff @@
## main #1739 +/- ##
==========================================
+ Coverage 84.45% 84.46% +0.01%
==========================================
Files 134 134
Lines 8840 8840
==========================================
+ Hits 7466 7467 +1
+ Misses 1374 1373 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes ☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
| ) | ||
| return any(issubclass(candidate, cls) for candidate in type(instance).mro()) | ||
| return any( | ||
| issubclass(candidate, cls) for candidate in type(instance).__mro__ |
There was a problem hiding this comment.
us safe version of is_subclass please
Sorry, something went wrong.
There was a problem hiding this comment.
i am not sure if we want that here. This implements the "normal" isinstance() call, so i don't think it should work with non-class inputs. For example, the following also raises an exception:
isinstance(3, List[int])TypeError: Subscripted generics cannot be used with class and instance checks
So I would not catch such things here
Sorry, something went wrong.
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
|
📝 Docs are deployed on https://ft-fix-tensor-equals-type--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Currently the following raises and exception:
Traceback (most recent call last): File "/home/johannes/.config/JetBrains/PyCharmCE2023.2/scratches/scratch_183.py", line 3, in <module> TorchTensor == type File "/home/johannes/Documents/jina/docarrayv2/docarray/typing/tensor/abstract_tensor.py", line 101, in __eq__ if cls._equals_special_case(other): File "/home/johannes/Documents/jina/docarrayv2/docarray/typing/tensor/abstract_tensor.py", line 62, in _equals_special_case is_tensor = is_type and AbstractTensor in other.mro() TypeError: descriptor 'mro' of 'type' object needs an argumentThis fixes that