105 lines
2.3 KiB
TOML
105 lines
2.3 KiB
TOML
[build-system]
|
|
build-backend = "hatchling.build"
|
|
requires = ["hatchling"]
|
|
|
|
[project]
|
|
dependencies = [
|
|
"fastapi>=0.104.0",
|
|
"uvicorn[standard]>=0.24.0",
|
|
"sqlalchemy>=2.0.0",
|
|
"pydantic>=2.5.0"
|
|
]
|
|
description = "Plex Playlist Management API"
|
|
name = "plex-playlist-backend"
|
|
requires-python = ">=3.13"
|
|
version = "0.1.0"
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"ruff>=0.6.0",
|
|
"pyright>=1.1.380",
|
|
"darglint>=1.8.1",
|
|
"pytest>=7.4.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"pytest-cov>=4.1.0"
|
|
]
|
|
|
|
[tool.ruff]
|
|
# Exclude common directories
|
|
exclude = [
|
|
".bzr",
|
|
".direnv",
|
|
".eggs",
|
|
".git",
|
|
".git-rewrite",
|
|
".hg",
|
|
".ipynb_checkpoints",
|
|
".mypy_cache",
|
|
".nox",
|
|
".pants.d",
|
|
".pyenv",
|
|
".pytest_cache",
|
|
".pytype",
|
|
".ruff_cache",
|
|
".svn",
|
|
".tox",
|
|
".venv",
|
|
".vscode",
|
|
"__pypackages__",
|
|
"_build",
|
|
"buck-out",
|
|
"build",
|
|
"dist",
|
|
"node_modules",
|
|
"site-packages",
|
|
"venv"
|
|
]
|
|
# Set the maximum line length
|
|
line-length = 88
|
|
target-version = "py313"
|
|
|
|
[tool.ruff.format]
|
|
# Like Black, indent with spaces, rather than tabs.
|
|
indent-style = "space"
|
|
# Like Black, automatically detect the appropriate line ending.
|
|
line-ending = "auto"
|
|
# Like Black, use double quotes for strings.
|
|
quote-style = "double"
|
|
# Like Black, respect magic trailing commas.
|
|
skip-magic-trailing-comma = false
|
|
|
|
[tool.ruff.lint]
|
|
# Allow unused variables when underscore-prefixed.
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
# Allow fix for all enabled rules (when `--fix`) is provided.
|
|
fixable = ["ALL"]
|
|
# Ignore specific rules
|
|
ignore = [
|
|
"E501", # line too long (handled by line-length setting)
|
|
"B008", # do not perform function calls in argument defaults
|
|
"RUF012" # mutable class attributes should be annotated with typing.ClassVar
|
|
]
|
|
# Enable specific 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
|
|
"TCH", # flake8-type-checking
|
|
"PTH", # flake8-use-pathlib
|
|
"RUF" # ruff-specific rules
|
|
]
|
|
unfixable = []
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["app"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Tests can use magic values, assertions, and relative imports
|
|
"tests/**/*" = ["PLR2004", "S101", "TID252"]
|