diff --git a/copier.yml b/copier.yml index 2a5abf1..0a3d152 100644 --- a/copier.yml +++ b/copier.yml @@ -101,6 +101,12 @@ apt_packages: build via apt-get on a Linux system. default: "libsndfile1," +ruff_ignore: + type: str + help: | + Enter a comma-separated list of files, directories, or file patterns that Ruff should ignore. + default: ".git,docs" + valid_python_versions: when: false type: yaml diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 5feac00..d1643ef 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -76,8 +76,9 @@ find = {} # Scan the project directory with the default parameters [tool.ruff] exclude = [ - ".git", - "docs", +{%- for key in ruff_ignore.split(',') %} + "{{ key.strip() }}", +{%- endfor %} ] line-length = 79 lint.ignore = [ diff --git a/tests/test_copier.py b/tests/test_copier.py index 98f3b11..f0a9653 100644 --- a/tests/test_copier.py +++ b/tests/test_copier.py @@ -101,6 +101,7 @@ def test_content_contributing(default_project, desired): 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: 3.14', 'Tracker = "https://github.com/pyfar/my_project/issues"', + '".git",\n "docs",', ]) def test_content_pyproject(default_project, desired): content = default_project.project_dir.joinpath(