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:
@@ -15,6 +15,7 @@
|
||||
from dataclasses import asdict, dataclass
|
||||
from datetime import timedelta
|
||||
from decimal import Decimal
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
from bs4 import BeautifulSoup
|
||||
@@ -22,7 +23,6 @@ from dateutil.relativedelta import relativedelta
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import Permission, make_password
|
||||
from django.contrib.messages import DEFAULT_LEVELS, get_messages
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import resolve_url
|
||||
from django.test import Client, TestCase
|
||||
from django.urls import reverse
|
||||
@@ -48,6 +48,9 @@ from counter.models import (
|
||||
Selling,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
def set_age(user: User, age: int):
|
||||
user.date_of_birth = localdate().replace(year=localdate().year - age)
|
||||
|
||||
Reference in New Issue
Block a user