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

Support parsing JSON output from mypy #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

duncanmmacleod
Copy link

This PR adds support for parsing JSON output from mypy (as generated by mypy --output json). The may be a route to more robust parsing, especially relative to potential upstream text format changes.

The main change is just updating the keys for the regex pattern to match what the JSON output provides. Testing on a local project the only change is the fingerprint.

I hope this change is welcome, am happy to change anything to suit the project, or have this rejected.

@soul-catcher
Copy link
Owner

Thank you for the pull request! Wow, I didn't know that mypy now supports JSON—that's awesome.

I'll review the PR in the next few days when I have some free time.

@UnknownPlatypus
Copy link

I didn't know that mypy now supports JSON—that's awesome.

The documentation is thin on this https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-O

This PR is looking good I think, it's probably more reliable overall

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.

3 participants