Skip to content

Show notification when Mypy exits abnormally #92

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

Merged
merged 1 commit into from
Feb 26, 2022

Conversation

intgr
Copy link
Collaborator

@intgr intgr commented Feb 20, 2022

Contributor checklist

  • I am targeting the master branch (and not the release branch)
  • I am using the provided codeStyleConfig.xml
  • I have tested my contribution on these versions of PyCharm/IDEA:
  • PyCharm Community 2021.3
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit
    using the Fixes #1234 syntax

Description

Before this change, when mypy failed for some reason (some cases of invalid configuration, bugs in plugins of mypy, etc), the errors were hidden and no inspections would appear in IDE. This is bad because it may make buggy Python code look correct.

Now the following notification appears (the content is verbatim from mypy stderr output)

Notification When expanded
image image
image image

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #60 -- or at least should help pinpointing the issue to get a better bug report.

Before this change, when mypy failed for some reason (some cases of
invalid configuration, bugs in plugins of mypy, etc), the errors were
hidden and no inspections would appear in IDE. This is bad because it
may make buggy Python code look correct.

Now a notification appears with content from mypy stderr output.
@intgr intgr force-pushed the report-mypy-failures branch from 5192db9 to adbce30 Compare February 20, 2022 20:24
@intgr intgr requested a review from leinardi February 20, 2022 20:27
Copy link
Owner

@leinardi leinardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement 👍
The code LGTM but I can't test it right now.

@intgr intgr mentioned this pull request Feb 21, 2022
@leinardi leinardi merged commit 34491d9 into leinardi:master Feb 26, 2022
@@ -50,6 +50,7 @@ plugin.notification.unable-to-run-mypy.subtitle=Unable to run Mypy
plugin.notification.unable-to-run-mypy.content=Mypy is installed inside the project environment but the plugin \
is not able to run it. If you just installed it try to run File -> Synchronize or restart your IDE. \
If the problem persists you may need to manually enter the path to the Mypy executable inside the Plugin settings.
plugin.notification.abnormal-exit.subtitle=Mypy exited abormally
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a typo on the word abnormally (abormally). I fixed it and already pushed on master.

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

Successfully merging this pull request may close these issues.

2 participants