-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
54 lines (49 loc) · 1.55 KB
/
pyproject.toml
File metadata and controls
54 lines (49 loc) · 1.55 KB
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
[tool.ruff]
# Ruff configuration for Python linting and formatting
target-version = "py311"
line-length = 120
src = ["django_server"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"S", # flake8-bandit (security)
"T20", # flake8-print
"DJ", # flake8-django
"RUF", # Ruff-specific rules
"PERF", # perflint (performance)
"PLE", # pylint errors
"PLW", # pylint warnings
"PGH", # pygrep-hooks
"FLY", # flynt (f-string conversion)
"FURB", # refurb (modern Python)
"PIE", # flake8-pie (misc. lints)
]
ignore = [
"E501", # Line too long (handled by formatter)
"S101", # Use of assert (common in tests)
"S106", # Hardcoded password (often false positives in tests)
"PIE804", # No unnecessary dict kwargs
"RUF012", # Mutable class variables (too noisy for Django models)
]
[tool.ruff.lint.per-file-ignores]
"*/tests/*.py" = ["S101", "S106", "ARG001"]
"*/migrations/*.py" = ["E501", "T20", "PERF", "ARG001"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.11"
plugins = ["mypy_django_plugin.main", "mypy_drf_plugin.main"]
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.django-stubs]
django_settings_module = "olmap_config.settings"