Skip to content

Commit

Permalink
Fix: pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
CBoYXD committed Jan 30, 2025
1 parent 9a76989 commit 70fface
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web_app/api/leaderboard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
This module handles leaderboard-related API endpoints.
"""
from fastapi import APIRouter
from web_app.db.crud.leaderboard import LeaderboardDBConnector
from web_app.api.serializers.leaderboard import UserLeaderboardItem, TokenPositionStatistic
Expand Down
3 changes: 3 additions & 0 deletions web_app/api/serializers/leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
from pydantic import BaseModel

class UserLeaderboardItem(BaseModel):
"""
Represents statistics for positions of a specific user.
"""
wallet_id: str
positions_number: int

Expand Down
4 changes: 4 additions & 0 deletions web_app/db/crud/leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def get_top_users_by_positions(self) -> list[dict]:
return []

def get_position_token_statistics(self) -> list[dict]:
"""
Retrieves closed/opened positions groupped by token_symbol.
:return: List of dictionaries containing token_symbol and total_positions.
"""
with self.Session() as db:
try:
results = (
Expand Down

0 comments on commit 70fface

Please sign in to comment.