Skip to content

Commit 251d2d1

Browse files
committed
Update ruff configuration to use modern lint section format
1 parent 6d5e82e commit 251d2d1

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

pyproject.toml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,6 @@ include = ["/src", "/tests", "/docs", "README.md", "CHANGELOG.md", "LICENSE"]
103103
line-length = 88
104104
target-version = "py312"
105105
src = ["src", "tests"]
106-
select = [
107-
"E", # pycodestyle errors
108-
"W", # pycodestyle warnings
109-
"F", # Pyflakes
110-
"I", # isort
111-
"B", # flake8-bugbear
112-
"C4", # flake8-comprehensions
113-
"N", # pep8-naming
114-
"UP", # pyupgrade
115-
"RUF", # Ruff-specific rules
116-
"SIM", # flake8-simplify
117-
"TID", # flake8-tidy-imports
118-
"PIE", # flake8-pie
119-
"PT", # flake8-pytest-style
120-
]
121106
exclude = [
122107
".bzr",
123108
".direnv",
@@ -147,6 +132,23 @@ exclude = [
147132
"venv",
148133
]
149134

135+
[tool.ruff.lint]
136+
select = [
137+
"E", # pycodestyle errors
138+
"W", # pycodestyle warnings
139+
"F", # Pyflakes
140+
"I", # isort
141+
"B", # flake8-bugbear
142+
"C4", # flake8-comprehensions
143+
"N", # pep8-naming
144+
"UP", # pyupgrade
145+
"RUF", # Ruff-specific rules
146+
"SIM", # flake8-simplify
147+
"TID", # flake8-tidy-imports
148+
"PIE", # flake8-pie
149+
"PT", # flake8-pytest-style
150+
]
151+
150152
ignore = [
151153
"E501", # Line too long (handled by formatter)
152154
"B008", # Do not perform function calls in argument defaults
@@ -161,12 +163,12 @@ unfixable = []
161163
# Allow unused variables when underscore-prefixed
162164
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
163165

164-
[tool.ruff.per-file-ignores]
166+
[tool.ruff.lint.per-file-ignores]
165167
"src/project_x_py/indicators/__init__.py" = ["N802"] # Allow uppercase function names for TA-Lib style compatibility
166168
"tests/**/*" = ["S101", "PLR2004", "PLR0913", "PLR0915"]
167169
"__init__.py" = ["F401"]
168170

169-
[tool.ruff.isort]
171+
[tool.ruff.lint.isort]
170172
known-first-party = ["project_x_py"]
171173
force-single-line = false
172174
combine-as-imports = true

0 commit comments

Comments
 (0)