mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable the RUF043 lint in Ruff
This commit is contained in:
@@ -262,6 +262,7 @@ select = [
|
||||
# "RUF039", # First argument to {call} is not raw string
|
||||
"RUF040", # Non-string literal used as assert message
|
||||
"RUF041", # Unnecessary nested `Literal`
|
||||
"RUF043", # Pattern passed to `match=` contains metacharacters but is neither escaped nor raw
|
||||
# "RUF048", # `__version__` may contain non-integral-like elements
|
||||
"RUF055", # Plain string pattern passed to `re` function
|
||||
# "RUF100", # Unused `noqa` directive
|
||||
|
||||
@@ -37,7 +37,7 @@ def test_html_math_renderer_is_duplicated(make_app, app_params):
|
||||
args, kwargs = app_params
|
||||
with pytest.raises(
|
||||
ConfigError,
|
||||
match='Many math_renderers are registered. But no math_renderer is selected.',
|
||||
match=r'Many math_renderers are registered\. But no math_renderer is selected\.',
|
||||
):
|
||||
make_app(*args, **kwargs)
|
||||
|
||||
@@ -74,5 +74,8 @@ def test_html_math_renderer_is_chosen(app):
|
||||
)
|
||||
def test_html_math_renderer_is_mismatched(make_app, app_params):
|
||||
args, kwargs = app_params
|
||||
with pytest.raises(ConfigError, match="Unknown math_renderer 'imgmath' is given."):
|
||||
with pytest.raises(
|
||||
ConfigError,
|
||||
match=r"Unknown math_renderer 'imgmath' is given\.",
|
||||
):
|
||||
make_app(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user