Files
Gondulf/pyproject.toml
Phil Skentelbery 7255867fde fix(config): update ruff configuration to modern format
Move ruff linting configuration from deprecated top-level settings
to the new [tool.ruff.lint] section to resolve deprecation warnings.
2025-11-20 10:42:50 -07:00

160 lines
3.1 KiB
TOML

[project]
name = "gondulf"
version = "0.1.0-dev"
description = "A self-hosted IndieAuth server implementation"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
{ name = "Gondulf Project" }
]
keywords = ["indieauth", "oauth2", "authentication", "self-hosted"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"fastapi>=0.104.0",
"uvicorn[standard]>=0.24.0",
"sqlalchemy>=2.0.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-multipart>=0.0.6",
]
[project.optional-dependencies]
dev = [
"black>=23.0.0",
"flake8>=6.0.0",
"mypy>=1.0.0",
"isort>=5.12.0",
"ruff>=0.1.0",
"bandit>=1.7.0",
]
test = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.20.0",
"pytest-mock>=3.10.0",
"freezegun>=1.2.0",
"factory-boy>=3.2.0",
"httpx>=0.24.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.black]
line-length = 88
target-version = ["py310"]
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 88
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
check_untyped_defs = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
asyncio_mode = "auto"
markers = [
"unit: Unit tests",
"integration: Integration tests",
"e2e: End-to-end tests",
]
[tool.coverage.run]
source = ["src/gondulf"]
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/.venv/*",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 88
target-version = "py310"
exclude = [
".git",
"__pycache__",
"docs",
"build",
"dist",
".venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
]
ignore = [
"E203", # whitespace before ':'
"E501", # line too long (handled by black)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py