Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Add Error format support, and JSON output option#11396
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
393820c282bd28ccda5b0c849a77fd2feabb18800151c1acc9177dabbc5ceac9d29ab0bd6d48dba8d17fa2bc04d35974e41e5ec91723219f2228c0a33d81b063001ead27be7eefe5c5d1872ae63abc9cb6c9ab11627ed8ee425cbe47f1b07e00ad4ac1fb6a2aafe3aafae321589ad1d37a3f7366d46f75e71a3728cca20379e16a88bf48905899f26880b8f30aafadf4cab2497fe71c3ad8f1d6e2fd45e4b03c5ce0e6896a0dc6d1File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -29,7 +29,7 @@ def report_error(self, error: "MypyError") -> str: | ||
| "message": error.message, | ||
| "hint": None if len(error.hints) == 0 else "\n".join(error.hints), | ||
| "code": None if error.errorcode is None else error.errorcode.code, | ||
| "severity": error.severity, | ||
| } | ||
| ) | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This module should define a dictionary | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -18,7 +18,7 @@ def foo() -> None: | ||
| foo(1) | ||
| [out] | ||
| {"file": "main", "line": 5, "column": 0, "message": "Too many arguments for \"foo\"", "hint": null, "code": "call-arg", "severity":"error"} | ||
| [case testOutputJsonWithHint] | ||
| # flags: --output=json | ||
| @@ -39,6 +39,6 @@ foo('42') | ||
| def bar() -> None: ... | ||
| bar('42') | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Add a test case with | ||
| [out] | ||
| {"file": "main", "line": 12, "column": 12, "message": "Revealed type is \"Overload(def (), def (x: builtins.int))\"", "hint": null, "code": "misc", "severity":"note"} | ||
| {"file": "main", "line": 14, "column": 0, "message": "No overload variant of \"foo\" matches argument type \"str\"", "hint": "Possible overload variants:\n def foo() -> None\n def foo(x: int) -> None", "code": "call-overload", "severity":"error"} | ||
| {"file": "main", "line": 17, "column": 0, "message": "Too many arguments for \"bar\"", "hint": null, "code": "call-arg", "severity":"error"} | ||