Fix import formatting and sorting

Ruff formatting fixes for import organization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-25 18:54:57 +02:00
parent 1a3401f418
commit 4b8af1d43a
6 changed files with 4 additions and 14 deletions

View File

@@ -44,7 +44,7 @@ from app.models.blocklist import (
ScheduleConfig, ScheduleConfig,
ScheduleInfo, ScheduleInfo,
) )
from app.services import ban_service, blocklist_service, geo_service from app.services import ban_service, blocklist_service
from app.tasks.blocklist_import import run_import_with_resources from app.tasks.blocklist_import import run_import_with_resources
router: APIRouter = APIRouter(prefix="/api/blocklists", tags=["Blocklists"]) router: APIRouter = APIRouter(prefix="/api/blocklists", tags=["Blocklists"])

View File

@@ -11,11 +11,6 @@ from app.dependencies import (
Fail2BanSocketDep, Fail2BanSocketDep,
Fail2BanStartCommandDep, Fail2BanStartCommandDep,
) )
from app.exceptions import (
ConfigOperationError,
Fail2BanConnectionError,
JailOperationError,
)
from app.models.config import ( from app.models.config import (
Fail2BanLogResponse, Fail2BanLogResponse,
GlobalConfigResponse, GlobalConfigResponse,

View File

@@ -34,7 +34,7 @@ from app.models.ban import (
TimeRange, TimeRange,
) )
from app.models.server import ServerStatus, ServerStatusResponse from app.models.server import ServerStatus, ServerStatusResponse
from app.services import ban_service, geo_service from app.services import ban_service
from app.utils.constants import DEFAULT_PAGE_SIZE from app.utils.constants import DEFAULT_PAGE_SIZE
router: APIRouter = APIRouter(prefix="/api/dashboard", tags=["Dashboard"]) router: APIRouter = APIRouter(prefix="/api/dashboard", tags=["Dashboard"])

View File

@@ -30,11 +30,6 @@ from app.dependencies import (
GeoCacheDep, GeoCacheDep,
HttpSessionDep, HttpSessionDep,
) )
from app.exceptions import (
Fail2BanConnectionError,
JailNotFoundError,
JailOperationError,
)
from app.models.ban import JailBannedIpsResponse from app.models.ban import JailBannedIpsResponse
from app.models.jail import ( from app.models.jail import (
IgnoreIpRequest, IgnoreIpRequest,

View File

@@ -62,8 +62,8 @@ if TYPE_CHECKING:
import aiosqlite import aiosqlite
from app.models.geo import GeoCacheLookup, GeoEnricher, GeoInfo from app.models.geo import GeoCacheLookup, GeoEnricher, GeoInfo
from app.services.geo_cache import GeoCache
from app.repositories.protocols import HistoryArchiveRepository from app.repositories.protocols import HistoryArchiveRepository
from app.services.geo_cache import GeoCache
log: structlog.stdlib.BoundLogger = structlog.get_logger() log: structlog.stdlib.BoundLogger = structlog.get_logger()

View File

@@ -39,10 +39,10 @@ if TYPE_CHECKING:
RegexTestResponse, RegexTestResponse,
) )
from app.models.geo import GeoEnricher, GeoInfo from app.models.geo import GeoEnricher, GeoInfo
from app.services.geo_cache import GeoCache
from app.models.history import HistoryListResponse, IpDetailResponse from app.models.history import HistoryListResponse, IpDetailResponse
from app.models.jail import JailDetailResponse, JailListResponse from app.models.jail import JailDetailResponse, JailListResponse
from app.models.server import ServerSettingsResponse, ServerSettingsUpdate, ServerStatus from app.models.server import ServerSettingsResponse, ServerSettingsUpdate, ServerStatus
from app.services.geo_cache import GeoCache
class AuthService(Protocol): class AuthService(Protocol):