Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
feat: get the list of PlateInfoContextModel from get_data function
Browse files Browse the repository at this point in the history
  • Loading branch information
NTGNguyen committed Dec 25, 2024
1 parent ee2df77 commit 35037e1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/check_phat_nguoi/modules/get_data/checkphatnguoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ def _create_violation_model(data: Dict):
@override
def get_data(self) -> list[PlateInfoContextModel]:
self._multi_thread_get_data()
plate_infos = [
GetDataCheckPhatNguoi.get_plate_violation(plate) for plate in self.data_dict
plate_infos: list[PlateInfoContextModel] = [
PlateInfoContextModel(
plate=plate,
violation=GetDataCheckPhatNguoi.get_plate_violation(
plate_violation_dict=plate_violation_dict
),
)
for plate, plate_violation_dict in self.data_dict.items()
]
return plate_infos

0 comments on commit 35037e1

Please sign in to comment.