chore: consolidate to single ruff config in root pyproject.toml
- Merge web ruff settings (select E/F/I/UP, line-length 100) into root config - Remove [tool.ruff] section from web/pyproject.toml - Remove "web" from root ruff exclude list - Simplify pre-commit hook to one command: ruff check . - Update CI to use: uv run ruff check . (from repo root) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,14 +36,6 @@ dev-dependencies = [
|
||||
"ruff>=0.3.0",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py311"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I", "UP"]
|
||||
ignore = ["E501"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
testpaths = ["tests"]
|
||||
|
||||
@@ -23,8 +23,7 @@ def admin_required(f):
|
||||
async def decorated(*args, **kwargs):
|
||||
if "admin" not in (g.get("user") or {}).get("roles", []):
|
||||
await flash("Admin access required.", "error")
|
||||
from quart import redirect as _redirect
|
||||
from quart import url_for as _url_for
|
||||
from quart import redirect as _redirect, url_for as _url_for
|
||||
return _redirect(_url_for("auth.login"))
|
||||
return await f(*args, **kwargs)
|
||||
return decorated
|
||||
|
||||
@@ -105,8 +105,7 @@ def create_app() -> Quart:
|
||||
# Health check
|
||||
@app.route("/health")
|
||||
async def health():
|
||||
from .analytics import _db_path as serving_db_path
|
||||
from .analytics import fetch_analytics
|
||||
from .analytics import _db_path as serving_db_path, fetch_analytics
|
||||
from .core import fetch_one
|
||||
result = {"status": "healthy", "sqlite": "ok", "duckdb": "ok"}
|
||||
try:
|
||||
|
||||
@@ -13,8 +13,7 @@ import os
|
||||
import sys
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from paddle_billing import Client as PaddleClient
|
||||
from paddle_billing import Environment, Options
|
||||
from paddle_billing import Client as PaddleClient, Environment, Options
|
||||
from paddle_billing.Entities.Shared import CurrencyCode, Money, TaxCategory
|
||||
from paddle_billing.Resources.Prices.Operations import CreatePrice
|
||||
from paddle_billing.Resources.Products.Operations import CreateProduct
|
||||
|
||||
@@ -14,9 +14,7 @@ from beanflows.billing.routes import (
|
||||
upsert_subscription,
|
||||
)
|
||||
from beanflows.core import config
|
||||
from hypothesis import HealthCheck, given
|
||||
from hypothesis import settings as h_settings
|
||||
from hypothesis import strategies as st
|
||||
from hypothesis import HealthCheck, given, settings as h_settings, strategies as st
|
||||
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# get_subscription
|
||||
|
||||
@@ -7,9 +7,7 @@ import json
|
||||
import pytest
|
||||
from beanflows.billing.routes import get_billing_customer, get_subscription
|
||||
from conftest import make_webhook_payload, sign_payload
|
||||
from hypothesis import HealthCheck, given
|
||||
from hypothesis import settings as h_settings
|
||||
from hypothesis import strategies as st
|
||||
from hypothesis import HealthCheck, given, settings as h_settings, strategies as st
|
||||
|
||||
WEBHOOK_PATH = "/billing/webhook/paddle"
|
||||
SIG_HEADER = "Paddle-Signature"
|
||||
|
||||
Reference in New Issue
Block a user