File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
crates/red_knot_python_semantic/resources/mdtest/call Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,12 @@ as the `instance` argument to `__get__`. A desugared version of `obj[key]` is ro
1616``` py
1717from typing import Any
1818
19- def find_in_mro (typ : type , name : str ) -> Any: ...
19+ def find_name_in_mro (typ : type , name : str ) -> Any:
20+ # See implementation in https://docs.python.org/3/howto/descriptor.html#invocation-from-an-instance
21+ pass
22+
2023def getitem_desugared (obj : object , key : object ) -> object :
21- getitem_callable = find_in_mro (type (obj), " __getitem__" )
24+ getitem_callable = find_name_in_mro (type (obj), " __getitem__" )
2225 if hasattr (getitem_callable, " __get__" ):
2326 getitem_callable = getitem_callable.__get__ (obj, type (obj))
2427
You can’t perform that action at this time.
0 commit comments