Enable Ruff's flake8-bandit checks

This commit is contained in:
Adam Turner
2022-12-29 23:46:04 +00:00
parent b5357774a7
commit 7fb45a9058
4 changed files with 11 additions and 7 deletions

View File

@@ -100,7 +100,7 @@ def test_quickstart_defaults(tempdir):
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
exec(conffile.read_text(encoding='utf8'), ns)
exec(conffile.read_text(encoding='utf8'), ns) # NoQA: S102
assert ns['extensions'] == []
assert ns['templates_path'] == ['_templates']
assert ns['project'] == 'Sphinx Test'
@@ -150,7 +150,7 @@ def test_quickstart_all_answers(tempdir):
conffile = tempdir / 'source' / 'conf.py'
assert conffile.isfile()
ns = {}
exec(conffile.read_text(encoding='utf8'), ns)
exec(conffile.read_text(encoding='utf8'), ns) # NoQA: S102
assert ns['extensions'] == [
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo'
]
@@ -231,7 +231,7 @@ def test_default_filename(tempdir):
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
exec(conffile.read_text(encoding='utf8'), ns)
exec(conffile.read_text(encoding='utf8'), ns) # NoQA: S102
def test_extensions(tempdir):
@@ -241,7 +241,7 @@ def test_extensions(tempdir):
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
exec(conffile.read_text(encoding='utf8'), ns)
exec(conffile.read_text(encoding='utf8'), ns) # NoQA: S102
assert ns['extensions'] == ['foo', 'bar', 'baz']