Skip to content

Commit a1ba775

Browse files
committed
chore: Add lint settings by Ruff
1 parent e8bbdcb commit a1ba775

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

pyproject.toml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ version = "0.1.0"
44
description = "Quick reference for common LeetCode Python techniques and patterns."
55
readme = "README.md"
66
requires-python = ">=3.13"
7-
dependencies = [
8-
"ruff>=0.7.4",
7+
dependencies = ["ruff>=0.7.4"]
8+
9+
[tool.ruff]
10+
select = [
11+
"N", # pep8-naming - Naming convention checks (e.g., function/class naming)
12+
"E", # pycodestyle errors - Basic Python code style checks
13+
"W", # pycodestyle warnings - Style warnings that aren't errors
14+
"D", # pycodestyle docstrings - Docstring checks
15+
"F", # pyflakes - Logical errors like unused imports/variables
16+
"I", # isort - Import sorting and organization
17+
"C90", # mccabe - Code complexity checks (cyclomatic complexity)
18+
"S", # bandit - Security issue detection
919
]
20+
21+
ignore = [
22+
"D200", # One-line docstring should fit on one line
23+
"D212", # Multi-line docstring summary should start at the first line
24+
"E501", # Line too long
25+
]
26+
fixable = [
27+
"ALL",
28+
] # Enable automatic fixing for all rules that support auto-fixing
29+
exclude = [".ruff_cache"]
30+
target-version = "py313"
31+
32+
[tool.ruff.lint.pydocstyle]
33+
convention = "google" # Google style docstrings
34+
35+
36+
[tool.ruff.lint.mccabe]
37+
max-complexity = 10 # Maximum cyclomatic complexity allowed for a function or method.

0 commit comments

Comments
 (0)