Poetry/pytest/ruff/black/mypy config mirroring the aio extension lint pipeline (spirekeeper template). `make test` runs pytest; `make check` runs the linters. Enables a tests/ suite for the extension. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
60 lines
1.2 KiB
TOML
60 lines
1.2 KiB
TOML
[tool.poetry]
|
|
name = "chatelet"
|
|
version = "0.1.0"
|
|
description = "Nostr-native room rentals (Airbnb-style) for LNbits"
|
|
authors = ["padreug <padreug@aiolabs.dev>"]
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.10 | ^3.9"
|
|
lnbits = {version = "*", allow-prereleases = true}
|
|
mypy = "^1.13.0"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
black = "^24.3.0"
|
|
pytest-asyncio = "^0.21.0"
|
|
pytest = "^7.3.2"
|
|
mypy = "^1.5.1"
|
|
pre-commit = "^3.2.2"
|
|
ruff = "^0.3.2"
|
|
pytest-md = "^0.2.0"
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.0.0"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
[tool.mypy]
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"lnbits.*",
|
|
"loguru.*",
|
|
"fastapi.*",
|
|
"pydantic.*",
|
|
]
|
|
ignore_missing_imports = "True"
|
|
|
|
[tool.pytest.ini_options]
|
|
log_cli = false
|
|
testpaths = [
|
|
"tests"
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
|
|
[tool.ruff]
|
|
line-length = 88
|
|
|
|
[tool.ruff.lint]
|
|
# F pyflakes / E,W pycodestyle / I isort / A builtins / C mccabe / N naming
|
|
# UP pyupgrade / RUF ruff / B bugbear
|
|
select = ["F", "E", "W", "I", "A", "C", "N", "UP", "RUF", "B"]
|
|
ignore = ["UP007"] # keep Optional[X] on py3.10
|
|
fixable = ["ALL"]
|
|
unfixable = []
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
|
|
[tool.ruff.lint.flake8-bugbear]
|
|
extend-immutable-calls = [
|
|
"fastapi.Depends",
|
|
"fastapi.Query",
|
|
]
|