Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jedi+ycm doesn't work with boto3-stubs #1904

Closed
Felixoid opened this issue Jan 13, 2023 · 3 comments
Closed

Jedi+ycm doesn't work with boto3-stubs #1904

Felixoid opened this issue Jan 13, 2023 · 3 comments

Comments

@Felixoid
Copy link

Hello!

I've installed boto3-stubs[essential], but it, unfortunately, doesn't show anything when I try to complete a simple code:

from boto3 import client
                        
s3_client = client("s3")
s3_client.              

Here's the result of :YcmDebugInfo:

Printing YouCompleteMe debug information...
-- Resolve completions: Up front
-- Client logfile: /tmp/ycm_e8kr_aol.log
-- Server Python interpreter: /usr/bin/python3
-- Server Python version: 3.10.9
-- Server has Clang support compiled in: False
-- Clang version: None
-- No extra configuration file found
-- Python completer debug information:
--   Python interpreter: /usr/bin/python3
--   Python root: /home/user/work
--   Python path: ['/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '
/home/felixoid/.local/lib/python3.10/site-packages', '/usr/lib/python3.10/site-packages']
--   Python version: 3.10.9
--   Jedi version: 0.18.1
--   Parso version: 0.8.3
-- Server running at: http://127.0.0.1:44191
-- Server process ID: 984684
-- Server logfiles:
--   /tmp/ycmd_44191_stdout_53lxlc9s.log
--   /tmp/ycmd_44191_stderr_fyzki1a9.log
-- Semantic highlighting supported: True
-- Virtual text supported: True
-- Popup windows supported: True

I'd like to provide more info, so here some more info

OS: Arch Linux

Related packages:

> pacman -Q | grep boto
python-boto3 1.24.96-1
python-boto3-stubs 1.24.96-1
python-botocore 1.27.96-1
python-botocore-stubs 1.29.16-1
@davidhalter
Copy link
Owner

Can you run this with Jedi commands directly and also run jedi.set_debug_function() to give us debug output?

@Felixoid
Copy link
Author

Felixoid commented Jan 13, 2023

Sure, here what I have:

> cat test.py   
import jedi

jedi.set_debug_function()
jedi.Script(
    " from boto3 import client; s3_client = client('s3'); s3_client."
).complete()

And here the result:
jedi.log

It looks like it stopped on Literal["ebs"] and don't go to Literal["s3"]

upd: it's the fresh master c89fa8e

@davidhalter
Copy link
Owner

davidhalter commented Jan 13, 2023

Yeah, this is probably a hard one, because Jedi gives up, because it had to infer too many things. I would say this is part of #1059 and I will therefore close this issue.

Note that this is a general architecture issue and the Rust rewrite I'm currently doing is probably already able to infer the types you're using correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants