fix: resolve CI failures — SQLite incompatibility and ruff lint errors
- Remove PostgreSQL-specific server_default from User.email_inbound_token. The column has a Python-side default (secrets.token_urlsafe) that works for both SQLite and PostgreSQL. The gen_random_bytes() server_default caused sqlite table creation to fail. - Add missing back_populates relationships to stub models so SQLAlchemy mapper configuration succeeds. Purchase.user and Store.user_accounts were missing, causing "has no property" errors during Base.metadata.create_all. - Auto-fix ruff import sorting (I001) across all source and test files. - Manually fix line-too-long (E501) in config.py. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
import uuid
|
||||
from datetime import UTC, datetime
|
||||
|
||||
from receiptwitness.shared.models import NormalizedProduct
|
||||
|
||||
from receiptwitness.pipeline.normalization import (
|
||||
MatchMethod,
|
||||
clean_name,
|
||||
@@ -14,6 +12,7 @@ from receiptwitness.pipeline.normalization import (
|
||||
match_by_upc,
|
||||
normalize_product,
|
||||
)
|
||||
from receiptwitness.shared.models import NormalizedProduct
|
||||
|
||||
|
||||
class TestCleanName:
|
||||
|
||||
Reference in New Issue
Block a user