refactor: modernize code quality tooling with Ruff
- Replace black, isort, and flake8 with Ruff (all-in-one linter and formatter) - Add comprehensive pyproject.toml configuration - Simplify Makefile code quality targets - Configure exclusions for venv/.venv in pyproject.toml - Auto-fix 1,359 linting issues across codebase Benefits: - Much faster builds (Ruff is written in Rust) - Single tool replaces multiple tools - More comprehensive rule set (UP, B, C4, SIM, PIE, RET, Q) - All configuration centralized in pyproject.toml - Better import sorting and formatting consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
"""
|
||||
Fixtures specific to middleware integration tests.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from models.database.vendor import Vendor
|
||||
|
||||
@@ -5,6 +5,7 @@ Integration tests for request context detection end-to-end flow.
|
||||
These tests verify that context type (API, ADMIN, VENDOR_DASHBOARD, SHOP, FALLBACK)
|
||||
is correctly detected through real HTTP requests.
|
||||
"""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -5,12 +5,11 @@ Integration tests for the complete middleware stack.
|
||||
These tests verify that all middleware components work together correctly
|
||||
through real HTTP requests, ensuring proper execution order and state injection.
|
||||
"""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from middleware.context import RequestContext
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
@pytest.mark.middleware
|
||||
|
||||
@@ -5,6 +5,7 @@ Integration tests for theme loading end-to-end flow.
|
||||
These tests verify that vendor themes are correctly loaded and injected
|
||||
into request.state through real HTTP requests.
|
||||
"""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -5,6 +5,7 @@ Integration tests for vendor context detection end-to-end flow.
|
||||
These tests verify that vendor detection works correctly through real HTTP requests
|
||||
for all routing modes: subdomain, custom domain, and path-based.
|
||||
"""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
Reference in New Issue
Block a user