mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
style: fix import order in settings.py for ruff compliance
Move mimetypes import to the top of the import block to satisfy ruff's import sorting rules (I001). The Windows mimetype fix from PR #82 placed the import after other imports, which violated the project's linting standards. Changes: - Move `import mimetypes` to alphabetically correct position - Update comment to clarify timing requirement Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ API endpoints for global settings management.
|
|||||||
Settings are stored in the registry database and shared across all projects.
|
Settings are stored in the registry database and shared across all projects.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import mimetypes
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -14,8 +15,7 @@ from fastapi import APIRouter
|
|||||||
|
|
||||||
from ..schemas import ModelInfo, ModelsResponse, SettingsResponse, SettingsUpdate
|
from ..schemas import ModelInfo, ModelsResponse, SettingsResponse, SettingsUpdate
|
||||||
|
|
||||||
# Mimetype fix for Windows
|
# Mimetype fix for Windows - must run before StaticFiles is mounted
|
||||||
import mimetypes
|
|
||||||
mimetypes.add_type("text/javascript", ".js", True)
|
mimetypes.add_type("text/javascript", ".js", True)
|
||||||
|
|
||||||
# Add root to path for registry import
|
# Add root to path for registry import
|
||||||
|
|||||||
Reference in New Issue
Block a user