forked from maziggy/bambuddy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
79 lines (72 loc) · 2.06 KB
/
pyproject.toml
File metadata and controls
79 lines (72 loc) · 2.06 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[project]
name = "bambuddy"
version = "0.1.5"
description = "Archive and manage Bambu Lab 3MF files"
requires-python = ">=3.11"
[tool.ruff]
target-version = "py311"
line-length = 120
exclude = [
".git",
".venv",
"venv",
"__pycache__",
"static",
"frontend",
"*.pyc",
]
[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
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults (FastAPI Depends)
"B904", # raise from (too noisy)
"ARG001", # unused function argument (common in FastAPI)
"ARG002", # unused method argument
"SIM108", # ternary operator (readability preference)
"SIM102", # nested if (readability preference)
"SIM105", # contextlib.suppress (readability preference)
"UP038", # isinstance tuple syntax (readability preference)
]
# Allow autofix for all enabled rules
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
# Tests can have unused imports and assertions
"**/tests/**" = ["F401", "F811", "ARG"]
# Init files often have unused imports for re-export
"**/__init__.py" = ["F401"]
# main.py needs early logging setup before other imports
"backend/app/main.py" = ["E402"]
# MQTT client has some unused variables for debugging
"backend/app/services/bambu_mqtt.py" = ["F841"]
[tool.ruff.lint.isort]
known-first-party = ["backend"]
force-single-line = false
combine-as-imports = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["backend/tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
asyncio_mode = "auto"
filterwarnings = [
"ignore::DeprecationWarning",
]
markers = [
"docker: marks tests that run in Docker integration environment",
]