This repository has been archived on 2022-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
ergast-py/ergast_py/models/constructor_standing.py
2022-06-01 14:31:52 +01:00

29 lines
1.0 KiB
Python

from dataclasses import dataclass
from ergast_py.models.constructor import Constructor
@dataclass
class ConstructorStanding:
"""
Representation of a Formula One Constructor's standing in a Season
Constructor Standings may contain:
position: Integer
positionText: String
points: Float
wins: Integer
constructor: Constructor
"""
def __init__(self, position: int, positionText: str, points: float, wins: int, constructor: Constructor) -> None:
self.position = position
self.positionText = positionText
self.points = points
self.wins = wins
self.constructor = constructor
pass
def __str__(self):
return f"ConstructorStanding(position={self.position}, positionText={self.positionText}, points={self.points}, wins={self.wins}, constructor={self.constructor})"
def __repr__(self):
return f"ConstructorStanding(position={self.position}, positionText={self.positionText}, points={self.points}, wins={self.wins}, constructor={self.constructor})"