Skip to content

Commit

Permalink
Update mypy output regex to support errors without line number
Browse files Browse the repository at this point in the history
  • Loading branch information
matangover committed Feb 20, 2021
1 parent 795605a commit 9886437
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let statusBarItem: vscode.StatusBarItem;
let activeChecks = 0;
let checkIndex = 1;

export const mypyOutputPattern = /^(?<file>[^:\n]+):(?<line>\d+)(:(?<column>\d+))?: (?<type>\w+): (?<message>.*)$/mg;
export const mypyOutputPattern = /^(?<file>[^:\n]+):((?<line>\d+):)?((?<column>\d+):)? (?<type>\w+): (?<message>.*)$/mg;

export async function activate(context: vscode.ExtensionContext): Promise<void> {
_context = context;
Expand Down

0 comments on commit 9886437

Please sign in to comment.