From c1fce74c08cd2390d302225d422a9bb8f54466c7 Mon Sep 17 00:00:00 2001 From: bain Date: Wed, 8 Jan 2025 22:10:37 +0100 Subject: [PATCH] ignore mypy and reformat --- pronotepy/clients.py | 4 +--- pronotepy/dataClasses.py | 9 +++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pronotepy/clients.py b/pronotepy/clients.py index 788d876..c408ec1 100644 --- a/pronotepy/clients.py +++ b/pronotepy/clients.py @@ -704,9 +704,7 @@ def homework( """ if not date_to: date_to = datetime.datetime.strptime( - self.func_options["donneesSec"]["data"]["General"]["DerniereDate"][ - "V" - ], + self.func_options["donneesSec"]["data"]["General"]["DerniereDate"]["V"], "%d/%m/%Y", ).date() json_data = { diff --git a/pronotepy/dataClasses.py b/pronotepy/dataClasses.py index c117a5f..bc68780 100644 --- a/pronotepy/dataClasses.py +++ b/pronotepy/dataClasses.py @@ -300,7 +300,7 @@ def serialize_slot(slot: Any) -> Any: if include_properties else self.__slots__ ) - for slot_name in to_iter: + for slot_name in to_iter: # type: ignore if slot_name.startswith("_") or slot_name in exclude: # Skip private and excluded slots continue @@ -516,9 +516,7 @@ def report(self) -> Optional[Report]: When ``None``, then the report is not yet published or is unavailable for any other reason """ json_data = {"periode": {"G": 2, "N": self.id, "L": self.name}} - data = self._client.post("PageBulletins", 13, json_data)["donneesSec"][ - "data" - ] + data = self._client.post("PageBulletins", 13, json_data)["donneesSec"]["data"] return Report(data) if "Message" not in data else None @property @@ -1835,8 +1833,7 @@ def guardians(self) -> List[Guardian]: {"Eleve": {"N": self.id}, "AvecEleve": True, "AvecResponsables": True}, ) return [ - Guardian(j) - for j in self._cache["donneesSec"]["data"]["Responsables"]["V"] + Guardian(j) for j in self._cache["donneesSec"]["data"]["Responsables"]["V"] ]