diff --git a/pyproject.toml b/pyproject.toml index 5e1a6012..f61433e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -280,11 +280,13 @@ ignore = [ "D416", "E501", "PLR0913", + "PLW1514", "PLW2901", "S301", "SIM108", "UP036", ] +preview = true show-fixes = true src = [ "src", @@ -312,6 +314,7 @@ known-first-party = ["compwa_policy"] "PGH001", "PLR0913", "PLR2004", + "PLR6301", "S101", "T20", ] diff --git a/src/compwa_policy/check_dev_files/github_workflows.py b/src/compwa_policy/check_dev_files/github_workflows.py index 977c5264..7903df35 100644 --- a/src/compwa_policy/check_dev_files/github_workflows.py +++ b/src/compwa_policy/check_dev_files/github_workflows.py @@ -29,7 +29,7 @@ from ruamel.yaml.main import YAML -def main( +def main( # noqa: PLR0917 allow_deprecated: bool, doc_apt_packages: list[str], github_pages: bool, @@ -94,7 +94,7 @@ def _update_pr_linting() -> None: raise PrecommitError(msg) -def _update_ci_workflow( +def _update_ci_workflow( # noqa: PLR0917 allow_deprecated: bool, doc_apt_packages: list[str], github_pages: bool, @@ -140,7 +140,7 @@ def update() -> None: executor.finalize() -def _get_ci_workflow( +def _get_ci_workflow( # noqa: PLR0917 path: Path, doc_apt_packages: list[str], github_pages: bool, diff --git a/src/compwa_policy/check_dev_files/ruff.py b/src/compwa_policy/check_dev_files/ruff.py index f0787172..058cca72 100644 --- a/src/compwa_policy/check_dev_files/ruff.py +++ b/src/compwa_policy/check_dev_files/ruff.py @@ -281,6 +281,7 @@ def __update_ruff_settings(has_notebooks: bool) -> None: "D407", # missing dashed underline after section "D416", # section name does not have to end with a colon "E501", # line-width already handled by black + "PLW1514", # allow missing encoding in open() "SIM108", # allow if-else blocks ] if "3.6" in get_supported_python_versions(): @@ -289,6 +290,7 @@ def __update_ruff_settings(has_notebooks: bool) -> None: minimal_settings = { "extend-select": __get_selected_ruff_rules(), "ignore": to_toml_array(ignores), + "preview": True, "show-fixes": True, "target-version": __get_target_version(), "task-tags": __get_task_tags(settings), @@ -492,6 +494,7 @@ def _update_ruff_per_file_ignores(has_notebooks: bool) -> None: "INP001", # allow implicit-namespace-package "PGH001", # allow eval "PLR2004", # magic-value-comparison + "PLR6301", # allow non-static method "S101", # allow assert "T20", # allow print and pprint }