Skip to content

Commit

Permalink
Merge from 5.x: PR #21042
Browse files Browse the repository at this point in the history
Fixes #20963
  • Loading branch information
ccordoba12 committed Jun 18, 2023
2 parents 60954ba + a791b70 commit 4c423a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from IPython.core import release as ipy_release
from IPython.core.application import get_ipython_dir
from flaky import flaky
import numpy as np
from packaging.version import parse
import pytest
from qtpy.QtCore import Qt
Expand Down Expand Up @@ -80,14 +81,17 @@ def test_banners(ipyconsole, qtbot):
"open interval ..."]),
("vectorize",
["pyfunc", "otype", "signature"],
["Generalized function class.<br>",
["Returns an object that acts like pyfunc, but takes arrays as<br>input."
"<br>",
"Define a vectorized function which takes a nested sequence ..."]),
("absolute",
["x", "/", "out"],
["Parameters<br>", "x : array_like ..."])]
)
@pytest.mark.skipif(not os.name == 'nt',
reason="Times out on macOS and fails on Linux")
@pytest.mark.skipif(parse(np.__version__) < parse('1.25.0'),
reason="Documentation for np.vectorize is different")
def test_get_calltips(ipyconsole, qtbot, function, signature, documentation):
"""Test that calltips show the documentation."""
shell = ipyconsole.get_current_shellwidget()
Expand Down
2 changes: 1 addition & 1 deletion spyder/utils/syntaxhighlighters.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def get_code_cell_name(text):
class PythonSH(BaseSH):
"""Python Syntax Highlighter"""
# Syntax highlighting rules:
add_kw = ['async', 'await']
add_kw = ['async', 'await', 'match', 'case']
PROG = re.compile(make_python_patterns(additional_keywords=add_kw), re.S)
IDPROG = re.compile(r"\s+(\w+)", re.S)
ASPROG = re.compile(r"\b(as)\b")
Expand Down

0 comments on commit 4c423a9

Please sign in to comment.