Skip to content

Commit

Permalink
DX: ignore missing module docstring in conf.py (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Jan 11, 2024
1 parent d27991b commit 6a1d93b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 0 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
"""Configuration file for the Sphinx documentation builder.
This file only contains a selection of the most common options. For a full list see the
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

from __future__ import annotations

from sphinx_api_relink.helpers import get_package_version
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ known-first-party = ["repoma"]
"S113",
"T201",
]
"docs/conf.py" = ["D100"]
"setup.py" = ["D100"]
"tests/*" = [
"D",
Expand Down
7 changes: 7 additions & 0 deletions src/repoma/check_dev_files/ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,13 @@ def _update_ruff_per_file_ignores(has_notebooks: bool) -> None:
"S113", # requests call without timeout
}
minimal_settings[key] = __merge_rules(default_ignores, settings.get(key, []))
conf_path = f"{docs_dir}/conf.py"
if os.path.exists(conf_path):
key = f"{conf_path}"
default_ignores = {
"D100", # no module docstring
}
minimal_settings[key] = __merge_rules(default_ignores, settings.get(key, []))
if os.path.exists("setup.py"):
minimal_settings["setup.py"] = to_toml_array(["D100"])
tests_dir = "tests"
Expand Down

0 comments on commit 6a1d93b

Please sign in to comment.