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.
but does not end up in the class AnyDocArray so we can handle this case in __class_getitem__ method of DocList by adding a condition to check if isinstance(item, object) and raise an exception of type ValueError
but does not end up in the class AnyDocArray so we can handle this case in __class_getitem__ method of DocList by adding a condition to check if isinstance(item, object) and raise an exception of type ValueError
Activity
punndcoder28 commentedon Sep 14, 2023
Hi @samsja I can work on this. From the docs I understand that the correct way is
samsja commentedon Sep 15, 2023
Yes exactly, the problem is that if you do
DocList[BaseDoc()]it will work but it should notpunndcoder28 commentedon Sep 15, 2023
Understood. Will go through the custom implementation of
safe_issubclassmethod and propose a solution for this issueJoanFM commentedon Sep 15, 2023
I do not think is that code u have to check, is the specific line, the
safe_issubclassmethod should not be touched I thinkpunndcoder28 commentedon Sep 16, 2023
Checked the implementation of classes
DocListandAnyDocArrayand noticed thatdocarray/docarray/array/doc_list/doc_list.py
Line 338 in d0b9990
the above line fails when we do
and the control goes to
docarray/docarray/array/doc_list/doc_list.py
Line 341 in d0b9990
but does not end up in the class
AnyDocArrayso we can handle this case in__class_getitem__method ofDocListby adding a condition to checkif isinstance(item, object)and raise an exception of typeValueErrorJoanFM commentedon Sep 16, 2023
sounds reasonable
JoanFM commentedon Sep 19, 2023
The second part of the ticket remains valid, will open a new issue