Skip to content

Commit e181bae

Browse files
committed
chore(ruff[lint]): Allow exec in the Sphinx config
why: `docs/conf.py` collects the project's title, copyright, and URLs by exec'ing the package's `__about__.py` into a dict, because `g/__init__.py` re-exports only `__version__`. The input is a tracked file in this repository, not user data, so the flake8-bandit warning has nothing to warn about here. what: - Per-file-ignore S102 for `docs/conf.py` https://docs.astral.sh/ruff/rules/exec-builtin/
1 parent 8fd88e8 commit e181bae

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ required-imports = [
196196

197197
[tool.ruff.lint.per-file-ignores]
198198
"*/__init__.py" = ["F401"]
199+
"docs/conf.py" = [
200+
# Sphinx collects the project's title, copyright, and URLs by exec'ing the
201+
# package's `__about__.py` into a dict; `g/__init__.py` re-exports only
202+
# `__version__`. The input is a tracked file here, not user data.
203+
"S102",
204+
]
199205

200206
[tool.pytest.ini_options]
201207
addopts = "--tb=short --no-header --showlocals --doctest-modules"

0 commit comments

Comments
 (0)