Skip to content

Commit 1a8affb

Browse files
krisctlprabhakk-mw
authored andcommitted
Fixes pylance warnings when parsing magic command arguments.
1 parent 64b055c commit 1a8affb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jupyter_matlab_kernel/magic_execution_engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The MathWorks, Inc.
1+
# Copyright 2024-2025 The MathWorks, Inc.
22

33
import importlib
44
import re
@@ -144,7 +144,7 @@ def get_magics_from_cell(cell_code):
144144
magic_dict = magic_matches.groupdict()
145145
params = magic_dict["params"].strip()
146146
if params:
147-
magic_dict["params"] = re.split("\s+", params)
147+
magic_dict["params"] = re.split(r"\s+", params)
148148
# transform ? parameter into a help magic, such that %%file? becomes %%help file
149149
if params.startswith("?"):
150150
# Ignore additional parameters after the ? parameter

0 commit comments

Comments
 (0)