From 07889bde4cc9c47af265776c368bec9147f16482 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 21 Feb 2024 09:49:24 -0500 Subject: [PATCH] pyproject: bump ruff, conditional rule (#14) Signed-off-by: William Woodruff --- {{cookiecutter.project_slug}}/pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 513ca90..77c05ee 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -34,7 +34,7 @@ test = ["pytest", "pytest-cov", "pretend", "coverage[toml]"] lint = [ # NOTE: ruff is under active development, so we pin conservatively here # and let Dependabot periodically perform this update. - "ruff < 0.0.293", + "ruff ~= 0.2", "mypy >= 1.0", "types-html5lib", "types-requests", @@ -89,10 +89,12 @@ target-version = "py38" [tool.ruff.lint] select = ["ALL"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] +{% if cookiecutter.entry_point -%} "{{ cookiecutter.__project_src_path }}/_cli.py" = [ "T201", # allow `print` in cli module ] +{%- endif %} "test/**/*.py" = [ "D", # no docstrings in tests "S101", # asserts are expected in tests