-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Show closest candidates for misspellings #824
Comments
This would be useful for at least these things:
|
There is basic support for attribute lookups in the |
This is done for attribute lookups, but not for the other things Jukka mentions. |
#4934 adds more details and use cases to the Module imports part of this issue, pasting those here and closing it as a duplicate of this one.
|
looking at this one |
This fixes the following case outlined in #824: ``` from subprocess import popen # Module 'subprocess' has no attribute 'popen' ``` is now ``` from subprocess import popen # Module 'subprocess' has no attribute 'popen'; maybe "Popen"? ```
I took a shot at the keyword argument name case. Comments are welcome. |
This fixes the following case outlined in #824 ```python def f(other: A) -> None: pass f(otter: A()) ``` `Unexpected keyword argument "otter" for "f"` is now `Unexpected keyword argument "otter" for "f"; did you mean "other"?`
Addresses the remainder of issue #824
This is now fully implemented. |
Instead of just saying
"foobar" undefined
try to look for closest candidates (using edit distance, for example) and give suggestions. For example:"get_stats" undefined, did you mean "getstats"?
.The text was updated successfully, but these errors were encountered: