Skip to content

Commit 582daea

Browse files
committed
Added a new parameter ruff_ignore to the copier.yml file, adjusted pyproject.toml and test_copier.py files
1 parent c583f50 commit 582daea

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

copier.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ apt_packages:
101101
build via apt-get on a Linux system.
102102
default: "libsndfile1,"
103103

104+
ruff_ignore:
105+
type: str
106+
help: |
107+
Enter a comma-separated list of files, directories, or file patterns that Ruff should ignore.
108+
default: "examples/,"
109+
104110
valid_python_versions:
105111
when: false
106112
type: yaml

template/pyproject.toml.jinja

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ find = {} # Scan the project directory with the default parameters
7878
exclude = [
7979
".git",
8080
"docs",
81+
{%- for key in ruff_ignore.split(',') %}
82+
"{{ key.strip() }}",
83+
{%- endfor %}
8184
]
8285
line-length = 79
8386
lint.ignore = [

tests/test_copier.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def test_content_contributing(default_project, desired):
101101
'Programming Language :: Python :: 3.13',
102102
'Programming Language :: Python :: 3.14',
103103
'Tracker = "https://github.com/pyfar/my_project/issues"',
104+
'"docs",\n "examples/",',
104105
])
105106
def test_content_pyproject(default_project, desired):
106107
content = default_project.project_dir.joinpath(

0 commit comments

Comments
 (0)