Skip to content

Commit

Permalink
Merge pull request #209 from lucas-luchack/master
Browse files Browse the repository at this point in the history
🎨 Add color for subject in average
  • Loading branch information
bain3 authored Jan 30, 2023
2 parents 097c611 + cadea6a commit aab7571
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pronotepy/dataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ class Average(Object):
out_of (str): maximum amount of points
default_out_of (str): the default maximum amount of points
subject (Subject): subject the average is from
background_color (str): background color of the subject
"""

def __init__(self, json_dict: dict) -> None:
Expand All @@ -549,6 +550,9 @@ def __init__(self, json_dict: dict) -> None:
self.min: str = self._resolver(Util.grade_parse, "moyMin", "V")
self.max: str = self._resolver(Util.grade_parse, "moyMax", "V")
self.subject = Subject(json_dict)
self.background_color: Optional[str] = self._resolver(
str, "couleur", strict=False
)

del self._resolver

Expand Down

0 comments on commit aab7571

Please sign in to comment.