mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-09 14:04:36 +00:00
re-apply ruff TCH rules
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from datetime import timedelta
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
from aemark import markdown
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import Permission
|
||||
from django.http import HttpResponse
|
||||
from django.test import Client, TestCase
|
||||
from django.urls import reverse
|
||||
from django.utils.timezone import now
|
||||
@@ -16,6 +16,9 @@ from com.ics_calendar import IcsCalendar
|
||||
from com.models import News, NewsDate
|
||||
from core.models import User
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
def accel_redirect_to_file(response: HttpResponse) -> Path | None:
|
||||
redirect = Path(response.headers.get("X-Accel-Redirect", ""))
|
||||
|
||||
Reference in New Issue
Block a user