Skip to content

Commit f644fc5

Browse files
CopilotTomeHirata
andauthored
chore: add E225 and E251 ruff lint rules for spacing around =
Agent-Logs-Url: https://github.com/CyberAgentAILab/python-dte-adjustment/sessions/c78547a9-11d0-425a-b916-dfbcc417a12f Co-authored-by: TomeHirata <33407409+TomeHirata@users.noreply.github.com>
1 parent 8546e79 commit f644fc5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: ruff
66
name: ruff (linter)
7-
args: [--fix]
7+
args: [--fix, --preview]
88
- id: ruff-format
99
name: ruff (formatter)
1010
- repo: https://github.com/pre-commit/pre-commit-hooks

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ dev-dependencies = [
5757
]
5858

5959
[tool.ruff.lint]
60+
preview = true
6061
# TID252: Ban relative imports - enforce absolute imports for internal modules
61-
select = ["TID252"]
62+
# E225: Missing whitespace around operator (e.g. x=1 → x = 1)
63+
# E251: Unexpected spaces around keyword / parameter equals (e.g. def f(a =0) → def f(a=0))
64+
select = ["TID252", "E225", "E251"]
6265

6366
[tool.ruff.lint.flake8-tidy-imports]
6467
# Ban all relative imports

0 commit comments

Comments
 (0)