microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
912 stars 131 forks source link

The IntelliSense for EmailMessage has wrong spelling in one function. #2055

Open ujjukumar opened 4 years ago

ujjukumar commented 4 years ago

Environment data

Version: 1.45.0 (system setup) Commit: d69a79b73808559a91206d73d7717ff5f798f23c Date: 2020-05-07T16:18:48.860Z Electron: 7.2.4 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18363

Problem

The autocomplete for Python module EmailMessage (from email.message module) has misspelling for function add_attachment. Instead of add_attachment it's completing it to add_attachement, which is creating this error when running:-

AttributeError: 'EmailMessage' object has no attribute 'add_attachement'

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

``` XXX ```


Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

``` XXXX ```

ericsnowcurrently commented 4 years ago

Hi @ujjukumar. Are you using Jedi or the Microsoft language server? Please provide the content of your workspace settings.json and of the "Python" output panel. Thanks!

ujjukumar commented 4 years ago

Hi @ericsnowcurrently, sorry I had exams so couldn't reply sooner. So, I am using Microsoft language server (default that comes from installing python extension).

And, Output panel has this message :- AttributeError: 'EmailMessage' object has no attribute 'add_attachement'

output json

And, workspace settings.json is this :- "python.pythonPath": "C:\\ProgramData\\Anaconda3\\envs\\caffe\\python.exe", "python.dataScience.jupyterServerURI": "local"

worspace json

ujjukumar commented 4 years ago

Also, when I change attachement to attachment it works fine!

This is code :- new

This is it's output :- output new

ericsnowcurrently commented 4 years ago

@ujjukumar, that's helpful information. I'm going to send this issue over to the language server team for further attention.

ujjukumar commented 4 years ago

Any update?

jakebailey commented 4 years ago

Requires #1371, as we vendor a copy of typeshed (and it hasn't been updated in a while due to compatibility problems).