From e22f0f12cad87bda7e40440a37862a13549a56fe Mon Sep 17 00:00:00 2001 From: WizzyGeek Date: Tue, 9 Jan 2024 00:01:59 +0530 Subject: [PATCH] chore: lint --- src/pwncore/models/ctf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pwncore/models/ctf.py b/src/pwncore/models/ctf.py index d4c79a6..ae6bcf3 100644 --- a/src/pwncore/models/ctf.py +++ b/src/pwncore/models/ctf.py @@ -1,8 +1,6 @@ from __future__ import annotations from math import tanh -from typing import Any, Optional, Tuple, Type -from tortoise.backends.base.client import BaseDBAsyncClient from tortoise.models import Model from tortoise import fields @@ -41,9 +39,12 @@ async def solves(self) -> int: return await SolvedProblem.filter(problem=self).count() async def _update_points(self) -> None: - self.points = round(self.mi + (self.ma - self.mi) * (1 - tanh(await self.solves()))) + self.points = round( + self.mi + (self.ma - self.mi) * (1 - tanh(await self.solves())) + ) await self.save() + class Hint(Model): id = fields.IntField(pk=True) order = fields.SmallIntField() # 0, 1, 2