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
Traceback (most recent call last):
File "/.../jtree.py", line 14, in <module>
interp.complete(line=1, column=2)
File "/.../jedi/api/helpers.py", line 487, in wrapper
return func(self, line, column, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/api/__init__.py", line 215, in complete
return completion.complete()
^^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/api/completion.py", line 170, in complete
cached_name, completion_names = self._complete_python(leaf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/api/completion.py", line 284, in _complete_python
cached_name, n = self._complete_trailer(dot.get_previous_leaf())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/api/completion.py", line 399, in _complete_trailer
return cached_name, self._complete_trailer_for_values(values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/api/completion.py", line 404, in _complete_trailer_for_values
return complete_trailer(user_context, values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/api/completion.py", line 550, in complete_trailer
completion_names += filter.values()
^^^^^^^^^^^^^^^
File "/.../jedi/inference/compiled/value.py", line 494, in values
names += self._get(
^^^^^^^^^^
File "/.../jedi/inference/compiled/value.py", line 462, in _get
).execute_annotation()
^^^^^^^^^^^^^^^^^^^^
File "/.../jedi/inference/compiled/value.py", line 260, in execute_annotation
return ValueSet([
^
File "/.../jedi/inference/compiled/value.py", line 261, in <listcomp>
v.with_generics(arguments)
^^^^^^^^^^^^^^^
AttributeError: 'TreeInstance' object has no attribute 'with_generics'
The text was updated successfully, but these errors were encountered:
Carreau
changed the title
'TreeInstance' object has no attribute 'with_generics' when using typing.Literal["str"] annotation.
'TreeInstance' object has no attribute 'with_generics' when using typing.Literal["str"] return annotation on property
Apr 22, 2024
I think Literal needs special casing here. This is definitely something can and should do. We should however probably try to also catch the case where with_generics does not exist on v. (Essentially catch the AttributeError)
See upstream issue ipython/ipython#14412, that I was able to reduce to
The text was updated successfully, but these errors were encountered: