Skip to content

Commit 026e8c6

Browse files
committed
ignore magic commands from linters
1 parent 3d73773 commit 026e8c6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/client/extension.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,17 @@ export function activate(context: vscode.ExtensionContext) {
7676
const formatProvider = new PythonFormattingEditProvider(context, formatOutChannel, pythonSettings, vscode.workspace.rootPath);
7777
context.subscriptions.push(vscode.languages.registerDocumentFormattingEditProvider(PYTHON, formatProvider));
7878
context.subscriptions.push(vscode.languages.registerDocumentRangeFormattingEditProvider(PYTHON, formatProvider));
79-
context.subscriptions.push(new LintProvider(context, lintingOutChannel, vscode.workspace.rootPath));
8079

81-
context.subscriptions.push(vscode.languages.registerCodeActionsProvider(PYTHON, new PythonCodeActionsProvider(context)));
82-
83-
tests.activate(context, unitTestOutChannel);
8480

8581
jupMain = new jup.Jupyter(lintingOutChannel);
82+
const documentHasJupyterCodeCells = jupMain.hasCodeCells.bind(jupMain);
8683
jupMain.activate(null);
8784
context.subscriptions.push(jupMain);
8885

86+
context.subscriptions.push(new LintProvider(context, lintingOutChannel, vscode.workspace.rootPath, documentHasJupyterCodeCells));
87+
context.subscriptions.push(vscode.languages.registerCodeActionsProvider(PYTHON, new PythonCodeActionsProvider(context)));
88+
tests.activate(context, unitTestOutChannel);
89+
8990
// Possible this extension loads before the others, so lets wait for 5 seconds
9091
setTimeout(disableOtherDocumentSymbolsProvider, 5000);
9192
}

0 commit comments

Comments
 (0)