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 |
|---|---|---|
| @@ -871,6 +871,7 @@ def report_internal_error(err: Exception, | ||
| # We use exit code 2 to signal that this is no ordinary error. | ||
| raise SystemExit(2) | ||
| class MypyError: | ||
| def __init__(self, | ||
| file_path: str, | ||
| @@ -886,9 +887,11 @@ def __init__(self, | ||
| self.hint = hint | ||
| self.errorcode = errorcode | ||
| # (file_path, line, column) | ||
| _ErrorLocation = Tuple[str, int, int] | ||
| def create_errors(error_tuples: List[ErrorTuple]) -> List[MypyError]: | ||
| errors: List[MypyError] = [] | ||
| latest_error_at_location: Dict[_ErrorLocation, MypyError] = {} | ||
| @@ -905,7 +908,7 @@ def create_errors(error_tuples: List[ErrorTuple]) -> List[MypyError]: | ||
| if error is None: | ||
| # No error tuple found for this hint. Ignoring it | ||
| ||
| continue | ||
| if error.hint == '': | ||
| error.hint = message | ||
| else: | ||
| @@ -917,4 +920,4 @@ def create_errors(error_tuples: List[ErrorTuple]) -> List[MypyError]: | ||
| error_location = (file_path, line, column) | ||
| latest_error_at_location[error_location] = error | ||
| return errors | ||