-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
57 lines (49 loc) · 2.22 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[project]
name = "leetcode-py-cheatsheet"
version = "0.1.0"
description = "Quick reference for common LeetCode Python techniques and patterns."
readme = "README.md"
requires-python = ">=3.13"
dependencies = []
[dependency-groups]
dev = ["mypy>=1.13.0", "ruff>=0.7.4"]
[tool.ruff]
select = [
"N", # pep8-naming - Naming convention checks (e.g., function/class naming)
"E", # pycodestyle errors - Basic Python code style checks
"W", # pycodestyle warnings - Style warnings that aren't errors
"D", # pycodestyle docstrings - Docstring checks
"F", # pyflakes - Logical errors like unused imports/variables
"I", # isort - Import sorting and organization
"C90", # mccabe - Code complexity checks (cyclomatic complexity)
"S", # bandit - Security issue detection
]
ignore = [
"D200", # One-line docstring should fit on one line
"D205", # Ruff: 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"E501", # Line too long
]
fixable = [
"ALL",
] # Enable automatic fixing for all rules that support auto-fixing
exclude = [".ruff_cache"]
target-version = "py313"
[tool.ruff.lint.pydocstyle]
convention = "google" # Google style docstrings
[tool.ruff.lint.mccabe]
max-complexity = 10 # Maximum cyclomatic complexity allowed for a function or method.
[tool.mypy]
python_version = "3.13"
exclude = ["^test/"] # TODO: this seems to not work
disable_error_code = ["var-annotated"]
#strict = true # Enable strict type checking mode
pretty = true # Show error messages in a more readable format
show_error_codes = true # Show error codes in error messages
incremental = true # Enable incremental mode for faster checking
disallow_untyped_defs = true # Disallow functions without type annotations
disallow_untyped_calls = true # Warn about calling functions without type annotations
no_implicit_optional = true # Disallow implicit optional types
warn_return_any = true # Warn about returning Any type
cache_dir = ".mypy_cache" # Directory for cache files
ignore_missing_imports = true # Skip type checking for missing imports (useful for third-party packages)