Enable the S701 lint in Ruff

This commit is contained in:
Adam Turner 2024-10-19 02:15:59 +01:00
parent f2d3a62865
commit b64e03a5fb
2 changed files with 1 additions and 2 deletions

View File

@ -69,7 +69,6 @@ ignore = [
"S404", # `subprocess` module is possibly insecure "S404", # `subprocess` module is possibly insecure
"S405", # `xml.etree` methods are vulnerable to XML attacks "S405", # `xml.etree` methods are vulnerable to XML attacks
"S603", # `subprocess` call: check for execution of untrusted input "S603", # `subprocess` call: check for execution of untrusted input
"S701", # Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function.
"S702", # Mako templates allow HTML and JavaScript rendering by default and are inherently open to XSS attacks "S702", # Mako templates allow HTML and JavaScript rendering by default and are inherently open to XSS attacks
# flake8-simplify # flake8-simplify
"SIM102", # Use a single `if` statement instead of nested `if` statements "SIM102", # Use a single `if` statement instead of nested `if` statements

View File

@ -165,7 +165,7 @@ def test_textwidth():
def test_heading(): def test_heading():
env = Environment() env = Environment(autoescape=True)
env.extend(language=None) env.extend(language=None)
assert heading(env, 'Hello') == 'Hello\n=====' assert heading(env, 'Hello') == 'Hello\n====='