Spaces:
Sleeping

File size: 1,505 Bytes
8463ed1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
64
65
66
# Ruff Configuration for MicroFunnel Backend
# https://docs.astral.sh/ruff/

[lint]
# Enable common rule sets
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
]

# Ignore specific rules
ignore = [
    "E501",   # line too long (handled by formatter)
    "B008",   # function call in default argument (FastAPI Depends)
    "B904",   # raise from (too strict)
    "ARG001", # unused function argument (common in FastAPI)
    "ARG002", # unused method argument
]

# Allow autofix for all enabled rules
fixable = ["ALL"]
unfixable = []

[lint.per-file-ignores]
# Tests can use magic values and assertions
"tests/**/*.py" = ["S101", "PLR2004"]
# Alembic migrations have specific patterns
"alembic/**/*.py" = ["E402", "F401"]
# __init__.py files often have unused imports
"__init__.py" = ["F401"]

[lint.isort]
known-first-party = ["app"]
force-single-line = false
lines-after-imports = 2

[format]
# Python 3.11+ compatible formatting
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

# Target Python version
target-version = "py311"

# Exclude directories
exclude = [
    ".git",
    ".venv",
    "__pycache__",
    "alembic/versions",
    ".mypy_cache",
    ".ruff_cache",
]

# Line length
line-length = 100