spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.34k stars 1.62k forks source link

Mistyped function names not detecting by real-time code checking #6221

Open Khalilsqu opened 6 years ago

Khalilsqu commented 6 years ago

Description of your problem

in comparison to VSC or pycharm, if the the attribute are miss-typed, no error is shown or highlighted in the script before running the code,

for example, import matplotlib.pyplot as plt

plt.ploot(..,..,..)

does not show error in the script before executing it.

What steps will reproduce the problem?

What is the expected output? What do you see instead?

Please provide any additional information below

Versions and main components

Dependencies

Please go to the menu entry Help > Optional Dependencies (or Help > Dependencies), press the button Copy to clipboard and paste the contents below:

CAM-Gerlach commented 6 years ago

Thanks for reporting. This is the case because pyflakes, the third party library Spyder uses for real time code checking, doesn't check for this. However, if you run Spyder's built in static analysis on the code, via pylint, it will find it, and even suggest a correction to "plot". As it would require a different code checker, it is not likely to be fixed soon, and almost certainly not before Spyder 4. If you'd like to propose a way to address it, feel free to do so; right now we have lost our funding so have very limited resources at the present.

Khalilsqu commented 6 years ago

Thank you for your comment, I like spyder way more than other ide as it is very user friendly and liked by students, hope future enhancements addresses this issue.

CAM-Gerlach commented 6 years ago

Glad to hear! Hopefully, but to my knowledge we'd probably have to switch to a different real-time code checker library, which would be nontrivial, and almost certainly wouldn't happen until the end of the year (the earliest Spyder 4 might be released) at the earliest. If you find Spyder useful want to help make that happen (sooner), you can donate to the project on OpenCollective. And, of course, you're welcome to contribute patches and PRs to the project; we're always happy to have your contributions. Thanks!