Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
WizzyGeek committed Jan 8, 2024
1 parent 0aba798 commit e22f0f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pwncore/models/ctf.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e22f0f1

Please sign in to comment.