Skip to content

Commit 0c29852

Browse files
committed
Add same check for ruff
1 parent 93892d7 commit 0c29852

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python-project-template/pyproject.toml.jinja

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ target-version = ["py{{ py.min(python_versions) | replace(".", "") }}"]
7878
profile = "black"
7979
line_length = 110
8080
{% endif -%}
81-
81+
{% if 'ruff_lint' in enforce_style or 'ruff_format' in enforce_style -%}
8282
[tool.ruff]
8383
line-length = 110
8484
target-version = "py{{ py.min(python_versions) | replace(".", "") }}"
85-
85+
{% endif -%}
86+
{% if 'ruff_lint' in enforce_style -%}
8687
[tool.ruff.lint]
8788
select = [
8889
# pycodestyle
@@ -114,7 +115,6 @@ select = [
114115
# Numpy v2.0 compatibility
115116
"NPY201",
116117
]
117-
118118
ignore = [
119119
"UP006", # Allow non standard library generics in type hints
120120
"UP007", # Allow Union in type hints
@@ -124,6 +124,7 @@ ignore = [
124124
"UP015", # Allow redundant open parameters
125125
"UP028", # Allow yield in for loop
126126
]
127+
{% endif -%}
127128

128129
{%- if mypy_type_checking != 'none' %}
129130
[tool.setuptools.package-data]

0 commit comments

Comments
 (0)