Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
63 lines (58 loc) · 1.7 KB
/
Copy pathpyproject.toml
File metadata and controls
63 lines (58 loc) · 1.7 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
55
56
57
58
59
60
61
62
63
[project]
name = "twibble"
version = "0.9.0"
description = "Twibble is a minimalist, Twitter-like microblogging platform built with Django. It lets users share short posts, follow others, and explore a simple, clean social feed."
requires-python = ">=3.12"
dependencies = [
"Django==6.0.1",
"django-bootstrap5==26.1",
"pillow==12.1.0",
"psycopg2-binary==2.9.10",
"python-dotenv==1.2.1",
]
[dependency-groups]
dev = ["pre-commit", "ruff"]
[tool.ruff]
target-version = "py310"
line-length = 88
indent-width = 4
[tool.ruff.lint]
# Added: UP (Upgrade), S (Bandit/Security), SIM (Simplify), T20 (Print)
select = [
"F", # Pyflakes
"E", # Pycodestyle Errors
"W", # Pycodestyle Warnings
"I", # Isort (Import sorting)
"B", # Bugbear (Bugs)
"DJ", # Django specific
"UP", # Pyupgrade (Modern syntax)
"S", # Bandit (Security)
"SIM", # Simplify (Cleaner code)
"T20", # No print statements
"RET", # Return statement simplification
"N", # Naming conventions (pep8-naming)
"ARG", # Unused arguments (flake8-unused-arguments)
"TC", # Type check (flake8-type-checking)
]
ignore = [
"E501",
"S101",
"ARG001",
"ARG002",
] # Ignore long lines, allow 'assert' in tests, and ignore unused request/args in Django views/methods
[tool.ruff.lint.per-file-ignores]
"**/migrations/*" = [
"I", # Isort (Import sorting)
"RUF012", # Mutable class attributes (Django migrations)
"S101", # assert
"E501", # long lines
]
"**/tests/*" = ["S101", "S106"]
"**/tests.py" = ["S101", "S106"]
"**/test_*.py" = ["S101", "S106"]
# Allow asserts and hardcoded passwords in tests
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"