Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "examples/,"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: "examples/,"
default: ""

I would make the default as empty. we dont have the folder examples anymore, that seems to be a leftover from an oder version


valid_python_versions:
when: false
type: yaml
Expand Down
3 changes: 3 additions & 0 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ find = {} # Scan the project directory with the default parameters
exclude = [
".git",
"docs",
{%- for key in ruff_ignore.split(',') %}
"{{ key.strip() }}",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
".git",
"docs",
{%- for key in ruff_ignore.split(',') %}
"{{ key.strip() }}",
{%- for key in ruff_ignore.split(',') %}
"{{ key.strip() }}",

why not to define all excluedes with the parameter, this would make it more flexible.
sorry, I think I did not see it ealier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, true, thanks! I didn't notice that either

{%- endfor %}
]
line-length = 79
lint.ignore = [
Expand Down
1 change: 1 addition & 0 deletions tests/test_copier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
'"docs",\n "examples/",',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'"docs",\n "examples/",',
'".git",\n "docs/",',

])
def test_content_pyproject(default_project, desired):
content = default_project.project_dir.joinpath(
Expand Down