-
Notifications
You must be signed in to change notification settings - Fork 14
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
Mypy Terminal does not update after saving fixes #19
Comments
This is actually intentional. Currently mypy daemon can be still slow to respond on large code bases (sometimes as slow as 10s) which would make updating on every edit painful. You can still re-run type check manually by hitting Ctrl + Shift + M or pressing the "Run" button. There is ongoing work to make daemon much faster, after we will add an option to auto-update type checking results. |
ahhh! Now it all makes sense. When i first set it up everytime i hit "Run" after the first time it would say it's already running and then crash. Thanks for your help! |
In PyCharm 2019.1 I don't seem to be able to re-run the daemon through this plugin. Running it the first time with Ctrl + Shift + M works just fine, but this shortcut has no effect after that. Should there be a dedicated run button for the mypy terminal? If so, it doesn't display for me. The ordinary run button (with project configurations) runs whatever commands or files have been configured, but this also seems to have no effect on the mypy terminal. |
Yes, there should be a button. Could you please attach a screenshot? |
Okay, there is a run button in the bottom-right corner of the mypy terminal that I didn't see before. It might have been hidden behind a pycharm notification. And indeed, the mypy run button works as expected, allowing to re-run. It's just the keyboard shortcut that only works once, until pycharm is fully restarted. |
@aolieman |
Of course: I'm running PyCharm 2019.1.3 on Ubuntu 18.04. PyCharm is installed with snap, and recently updated to the latest minor version. The keyboard shortcut Ctrl + Shift + M didn't work for me in earlier minor versions either. This may be mostly irrelevant, since I just figured out that the issue is caused by PyCharm's keymap settings. When trying the shortcut again just now, I noticed that this key combo is mapped to something in PyCharm: when the cursor is placed between any kind of brackets in the editor pane, the shortcut toggles the cursor position between the opening and closing bracket. This is listed as "Move Caret to Matching Brace" in the default keymap, and many others (I didn't check them all). So this is just another hotkey clash, and going by #1 you were already aware of this particular one. I wasn't too bothered by the issue after finding the run button, but it's nice to be able to rerun without having to click since I edited the keymap. Perhaps you were thrown off by my initial report, that:
That wasn't entirely accurate. It has to do with pane focus within PyCharm: the hotkey works just fine on a fresh startup, and also when focus is on the project/files pane, regardless of the keymap. The counter-intuitive thing is that I tried to put focus on the Mypy terminal before, but that doesn't take focus away from the editor pane. |
Does mypy still suffer from this limitation after the introduction of mypyc? |
It is 5x faster, but still I don't want this to be the default (partially because it is conceptually wrong, mypy is not a linter, partially because we need to figure out what to do if there is a syntax error in the code, which is almost always the case while one types). |
PyCharm can usually already detect syntax errors by itse;f. Maybe the plugin could somehow detect (via PyCharm) that there are no syntax errors and only then run mypy? |
Yeah, this was the plan, I just didn't have time to figure out how this would work. If you have time, PRs are very welcome! |
I'm not sure if this is a bug or i'm just super slow.
Once the plugin generates all of the typing errors (which is amaizing by the way, thank you!), the mypy terminal errors will never update no matter what i fix/change.
I feel like this has to be me because no one else has raised this in either open or closed issues but i'm hoping it could be a bug on PyCharm 2018.3 RC.
Is anyone using the latest EAP/RC?
Just to make sure. Are the errors in the terminal suppose to update when i save file changes?
Thanks for any help.
The text was updated successfully, but these errors were encountered: