Skip to content

Commit 616c290

Browse files
enable style check
1 parent 9528f4d commit 616c290

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

pyproject.toml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,54 @@ exclude_lines = [
109109
]
110110

111111
[tool.ruff]
112+
include = ["dspy/**/*.py", "tests/**/*.py"]
113+
114+
112115
line-length = 120
113116
indent-width = 4
114117
target-version = "py39"
115118

116119
[tool.ruff.lint]
117120
select = [
118-
"F", # Pyflakes
119-
"E", # Pycodestyle
120-
"TID252", # Absolute imports
121+
"E", # pycodestyle errors
122+
"W", # pycodestyle warnings
123+
"F", # pyflakes
124+
"I", # isort
125+
"C", # flake8-comprehensions
126+
"B", # flake8-bugbear
127+
"UP", #
128+
"N", # pep8-naming
129+
"RUF", # ruff-specific rules
121130
]
131+
122132
ignore = [
123-
"E501", # Line too long
133+
"B027", # Allow non-abstract empty methods in abstract base classes
134+
"FBT003",# Allow boolean positional values in function calls
135+
"C901", # Ignore complexity checking
136+
"E501", # Ignore line length errors (handled by formatter)
124137
]
138+
139+
# Allow fix for all enabled rules (when `--fix`) is provided.
125140
fixable = ["ALL"]
126141
unfixable = []
127142

128143
[tool.ruff.format]
129144
docstring-code-format = false
145+
quote-style = "double"
130146
indent-style = "space"
147+
skip-magic-trailing-comma = false
131148
line-ending = "auto"
132149

150+
[tool.ruff.lint.isort]
151+
known-first-party = ["dspy"]
152+
153+
[tool.ruff.lint.flake8-tidy-imports]
154+
ban-relative-imports = "all"
155+
133156
[tool.ruff.lint.per-file-ignores]
134-
"**/{tests,testing,docs}/*" = ["ALL"]
135-
"**__init__.py" = ["ALL"]
157+
"tests/**/*.py" = [
158+
"S101", # Allow assert statements in tests
159+
"TID252", # Allow relative imports in tests
160+
"ARG001", # Allow unused arguments in tests (like pytest fixtures)
161+
]
162+
"__init__.py" = ["F401"] # Init files can be empty

0 commit comments

Comments
 (0)