pyproject.toml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. [project]
  2. name = "bambuddy"
  3. version = "0.1.5"
  4. description = "Archive and manage Bambu Lab 3MF files"
  5. requires-python = ">=3.11"
  6. [tool.ruff]
  7. target-version = "py311"
  8. line-length = 120
  9. exclude = [
  10. ".git",
  11. ".venv",
  12. "venv",
  13. "__pycache__",
  14. "static",
  15. "frontend",
  16. "*.pyc",
  17. ]
  18. [tool.ruff.lint]
  19. select = [
  20. "E", # pycodestyle errors
  21. "W", # pycodestyle warnings
  22. "F", # Pyflakes
  23. "I", # isort
  24. "B", # flake8-bugbear
  25. "C4", # flake8-comprehensions
  26. "UP", # pyupgrade
  27. "ARG", # flake8-unused-arguments
  28. "SIM", # flake8-simplify
  29. ]
  30. ignore = [
  31. "E501", # line too long (handled by formatter)
  32. "B008", # do not perform function calls in argument defaults (FastAPI Depends)
  33. "B904", # raise from (too noisy)
  34. "ARG001", # unused function argument (common in FastAPI)
  35. "ARG002", # unused method argument
  36. "SIM108", # ternary operator (readability preference)
  37. ]
  38. # Allow autofix for all enabled rules
  39. fixable = ["ALL"]
  40. unfixable = []
  41. [tool.ruff.lint.per-file-ignores]
  42. # Tests can have unused imports and assertions
  43. "**/tests/**" = ["F401", "F811", "ARG"]
  44. # Init files often have unused imports for re-export
  45. "**/__init__.py" = ["F401"]
  46. [tool.ruff.lint.isort]
  47. known-first-party = ["backend"]
  48. force-single-line = false
  49. combine-as-imports = true
  50. [tool.ruff.format]
  51. quote-style = "double"
  52. indent-style = "space"
  53. skip-magic-trailing-comma = false
  54. line-ending = "auto"
  55. [tool.pytest.ini_options]
  56. testpaths = ["backend/tests"]
  57. python_files = ["test_*.py"]
  58. python_functions = ["test_*"]
  59. asyncio_mode = "auto"
  60. filterwarnings = [
  61. "ignore::DeprecationWarning",
  62. ]