diff --git a/news/2 Fixes/2380.md b/news/2 Fixes/2380.md new file mode 100644 index 000000000000..815460e745a0 --- /dev/null +++ b/news/2 Fixes/2380.md @@ -0,0 +1,2 @@ +Fix the regex expression to match MyPy linter messages that expects the file name to have a .py extension, that isn't always the case, to catch any filename. +E.g., .pyi files that describes interfaces wouldn't get the linter messages to Problems tab. diff --git a/src/client/linters/mypy.ts b/src/client/linters/mypy.ts index 5b0930e660bd..3a3f824fd9d5 100644 --- a/src/client/linters/mypy.ts +++ b/src/client/linters/mypy.ts @@ -5,7 +5,7 @@ import { IServiceContainer } from '../ioc/types'; import { BaseLinter } from './baseLinter'; import { ILintMessage } from './types'; -const REGEX = '(?.py):(?\\d+): (?\\w+): (?.*)\\r?(\\n|$)'; +const REGEX = '(?.+):(?\\d+): (?\\w+): (?.*)\\r?(\\n|$)'; export class MyPy extends BaseLinter { constructor(outputChannel: OutputChannel, serviceContainer: IServiceContainer) {