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

Auto-correct misspellings of module attribute names #4934

Closed
JukkaL opened this issue Apr 19, 2018 · 6 comments
Closed

Auto-correct misspellings of module attribute names #4934

JukkaL opened this issue Apr 19, 2018 · 6 comments

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 19, 2018

Mypy can suggest correct spellings for some attributes, but it doesn't seem to work for module attributes:

from subprocess import popen  # Module 'subprocess' has no attribute 'popen'

import subprocess
subprocess.popen  # Module has no attribute "popen"

class Foobar:
    def do_it(self): pass
foobar  # Name 'foobar' is not defined

Foobar().doit()  # "Foobar" has no attribute "doit"; maybe "do_it"?

It would be better if mypy would suggest corrections for all of the cases in the above example.

Marking as high priority since this should be easy to fix and pretty high impact.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Apr 19, 2018

#4926 is an example where this would have been useful.

@gvanrossum
Copy link
Member

I'm not sure I'd call this high priority, compared to all the other open high priority issues.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Apr 20, 2018

Fair enough, marking as normal priority.

@marcodoordash
Copy link
Contributor

looking at this issue

@marcodoordash
Copy link
Contributor

@JukkaL as per our conversation, I referenced this in #824 as they partially overlap - could you please close this one?

@ilevkivskyi
Copy link
Member

Closing in favor of #824

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

No branches or pull requests

4 participants