Skip to content

Commit

Permalink
feat: rename Formation to FormationDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel-Dijoux committed Jan 23, 2024
1 parent 775e2cd commit 1321576
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/business_logic/formation/get_formation_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


@dataclass
class Formation:
class FormationDetail:
id: str
exceptions: Optional[ParcourSupExpectations]
duree: str
Expand All @@ -45,7 +45,7 @@ def _read_json_formation(for_id: str) -> Optional[dict[str, Any]]:
return result if len(result) > 0 else None


def _process_formation(for_id: str) -> Formation:
def _process_formation(for_id: str) -> FormationDetail:
formation = _read_json_formation(for_id)

if formation:
Expand All @@ -69,7 +69,7 @@ def _process_formation(for_id: str) -> Formation:
poursuite_etudes if poursuite_etudes else None
)
updated_at = formation["modification_date"]
return Formation(
return FormationDetail(
id=identifiant,
exceptions=exceptions,
duree=duree,
Expand All @@ -84,7 +84,7 @@ def _process_formation(for_id: str) -> Formation:
)


def get_formation_by_id(for_id: str) -> Formation:
def get_formation_by_id(for_id: str) -> FormationDetail:
try:
return _process_formation(for_id)
except Exception as e:
Expand Down

0 comments on commit 1321576

Please sign in to comment.