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

This doesn't appear to work with python>=3.6 type hints #2

Closed
SamLewis0602 opened this issue Feb 18, 2019 · 7 comments

Comments

Projects
None yet
3 participants
@SamLewis0602
Copy link

commented Feb 18, 2019

As of python 3.6, type hints have changed from

client = boto3.client('ssm')  # type: botostubs.SSM

to

client: botostubs.SSM = boto3.client('ssm')

and I can't get it to work in VS code. I never used it in python 3.5 so I'm not sure if the new type hints are the issue or it's just not working with my vscode for some other reason, but I wanted to rule out the type hint format change.

@jeshan

This comment has been minimized.

Copy link
Owner

commented Feb 19, 2019

This package has nothing IDE-specific, it's a regular PyPI package like any other.
Here it is working in my Intellij IDEA:
image

Please check if type hints from other packages work. If it doesn't, see if others are experiencing the same issue in the VS Code issue tracker.

Let me know how it goes.

@jeshan

This comment has been minimized.

Copy link
Owner

commented Feb 28, 2019

any news @SamLewis0602 ?

@SamLewis0602

This comment has been minimized.

Copy link
Author

commented Feb 28, 2019

Sorry, I haven't had time to figure this out and likely won't soon. Feel free to close this and I can always reopen it once I've got more info. Your screenshot has convinced me that it's something with my environment, I just haven't had the time to dig in and figure out what it is 😁

@jeshan jeshan closed this Feb 28, 2019

@SamLewis0602

This comment has been minimized.

Copy link
Author

commented Mar 1, 2019

These two images confirm that type hints are working in vscode in general:

image

image

However, I don't get anything from the botostubs type hint.
image
I have the latest versions of boto* libraries as of today:

boto3                    1.9.105           
botocore                 1.12.105          
botostubs                0.4.1.9.105 

Any thoughts?

@SamLewis0602

This comment has been minimized.

Copy link
Author

commented Mar 1, 2019

I just discovered, if I enable Jedi as the Intellisense engine in settings (just search jedi in settings to find it) then the botostubs methods work. So this appears to be an issue with type hints. It also looks like they have an as-of-yet unreleased fix here: microsoft/python-language-server#546

@jeshan

This comment has been minimized.

Copy link
Owner

commented Mar 3, 2019

@pcgeek86

This comment has been minimized.

Copy link

commented Jun 11, 2019

I got this working by disabling the Jedi Intellisense engine, opting for the Microsoft Python Language Server instead. That's accomplished by adding the following to my user settings JSON configuration.

    "python.jediEnabled": false

Also, I posted the issue with the botostubs over on the Jedi project. Hopefully they'll be able to fix it. It's hard to say if it's an issue with Jedi or the Python extension for Visual Studio Code.

davidhalter/jedi#1341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.