Skip to content

Add a parameter for custom Ruff ignores#42

Open
h-chmeruk wants to merge 3 commits intomainfrom
add-pyproject.toml-ruff-exclude
Open

Add a parameter for custom Ruff ignores#42
h-chmeruk wants to merge 3 commits intomainfrom
add-pyproject.toml-ruff-exclude

Conversation

@h-chmeruk
Copy link
Contributor

Which issue(s) are closed by this pull request?

Closes #26

Changes proposed in this pull request:

  • Added a new parameter called ruff_ignore to the copier.yml file. This parameter can be used to define files, directories, or file patterns that should be ignored by Ruff.
  • Adjusted the pyproject.toml.jinja file to include the entries from the ruff_ignore parameter.
  • Adjusted the test_content_pyproject() function to test correct include of the custom ignores.

@h-chmeruk h-chmeruk added this to the v0.1.0 milestone Feb 27, 2026
@h-chmeruk h-chmeruk added the enhancement New feature or request label Feb 27, 2026
@h-chmeruk h-chmeruk moved this from Backlog to Require review in Weekly Planning Feb 27, 2026
@h-chmeruk h-chmeruk requested a review from ahms5 February 27, 2026 10:03
Copy link
Member

@ahms5 ahms5 left a comment

Choose a reason for hiding this comment

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

nice almost done

copier.yml Outdated
type: str
help: |
Enter a comma-separated list of files, directories, or file patterns that Ruff should ignore.
default: "examples/,"
Copy link
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

@h-chmeruk h-chmeruk requested a review from ahms5 March 6, 2026 08:58
Copy link
Member

@ahms5 ahms5 left a comment

Choose a reason for hiding this comment

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

nice, otherwise approved

Comment on lines +79 to +82
".git",
"docs",
{%- for key in ruff_ignore.split(',') %}
"{{ key.strip() }}",
Copy link
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
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

copier.yml Outdated
type: str
help: |
Enter a comma-separated list of files, directories, or file patterns that Ruff should ignore.
default: ""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
default: ""
default: ".git,docs"

'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Tracker = "https://github.com/pyfar/my_project/issues"',
'"docs",\n "examples/",',
Copy link
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/",',

@h-chmeruk h-chmeruk requested a review from ahms5 March 20, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Require review

Development

Successfully merging this pull request may close these issues.

pyroject.toml ruff ignore

2 participants