style: apply black and isort formatting across entire codebase

- Standardize quote style (single to double quotes)
- Reorder and group imports alphabetically
- Fix line breaks and indentation for consistency
- Apply PEP 8 formatting standards

Also updated Makefile to exclude both venv and .venv from code quality checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-28 19:30:17 +01:00
parent 13f0094743
commit 21c13ca39b
236 changed files with 8450 additions and 6545 deletions

View File

@@ -53,6 +53,7 @@ def test_admin(db, auth_manager):
db.expunge(admin)
return admin
@pytest.fixture
def another_admin(db, auth_manager):
"""Create another test admin user for testing admin-to-admin interactions"""
@@ -72,6 +73,7 @@ def another_admin(db, auth_manager):
db.expunge(admin)
return admin
@pytest.fixture
def other_user(db, auth_manager):
"""Create a different user for testing access controls"""

View File

@@ -1,5 +1,6 @@
# tests/fixtures/customer_fixtures.py
import pytest
from models.database.customer import Customer, CustomerAddress

View File

@@ -1,5 +1,6 @@
# tests/fixtures/marketplace_import_job_fixtures.py
import pytest
from models.database.marketplace_import_job import MarketplaceImportJob

View File

@@ -117,7 +117,9 @@ def marketplace_product_factory():
@pytest.fixture
def test_marketplace_product_with_inventory(db, test_marketplace_product, test_inventory):
def test_marketplace_product_with_inventory(
db, test_marketplace_product, test_inventory
):
"""MarketplaceProduct with associated inventory record."""
# Ensure they're linked by GTIN
if test_marketplace_product.gtin != test_inventory.gtin:
@@ -126,6 +128,6 @@ def test_marketplace_product_with_inventory(db, test_marketplace_product, test_i
db.refresh(test_inventory)
return {
'marketplace_product': test_marketplace_product,
'inventory': test_inventory
"marketplace_product": test_marketplace_product,
"inventory": test_inventory,
}

View File

@@ -8,8 +8,9 @@ This module provides fixtures for:
- Additional testing utilities
"""
import pytest
from unittest.mock import Mock
import pytest
from sqlalchemy.exc import SQLAlchemyError
@@ -26,7 +27,7 @@ def empty_db(db):
"inventory", # Fixed: singular not plural
"products", # Referenced by products
"vendors", # Has foreign key to users
"users" # Base table
"users", # Base table
]
for table in tables_to_clear:

View File

@@ -1,10 +1,11 @@
# tests/fixtures/vendor_fixtures.py
import uuid
import pytest
from models.database.vendor import Vendor
from models.database.product import Product
from models.database.inventory import Inventory
from models.database.product import Product
from models.database.vendor import Vendor
@pytest.fixture
@@ -185,6 +186,7 @@ def multiple_inventory_entries(db, multiple_products, test_vendor):
def create_unique_vendor_factory():
"""Factory function to create unique vendors in tests"""
def _create_vendor(db, owner_user_id, **kwargs):
unique_id = str(uuid.uuid4())[:8]
defaults = {