From f8907a8dbd3fe521df3ec5e854bc83a70fd92345 Mon Sep 17 00:00:00 2001 From: Philip Flohr Date: Tue, 24 Nov 2020 19:58:25 +0100 Subject: [PATCH] Raise NotImplementedError if a function is called which is not implemented (#10) --- src/personio_py/client.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/personio_py/client.py b/src/personio_py/client.py index 79a7f69..357b8c5 100644 --- a/src/personio_py/client.py +++ b/src/personio_py/client.py @@ -268,8 +268,7 @@ def update_employee(self, employee: Employee): """ placeholder; not ready to be used """ - # TODO implement - pass + raise NotImplementedError() def get_attendances(self, employees: Union[int, List[int], Employee, List[Employee]], start_date: datetime = None, end_date: datetime = None) -> List[Attendance]: @@ -296,22 +295,19 @@ def create_attendances(self, attendances: List[Attendance]): """ # attendances can be created individually, but here you can push a huge bunch of items # in a single request, which can be significantly faster - # TODO implement - pass + raise NotImplementedError() def update_attendance(self, attendance_id: int): """ placeholder; not ready to be used """ - # TODO implement - pass + raise NotImplementedError() def delete_attendance(self, attendance_id: int): """ placeholder; not ready to be used """ - # TODO implement - pass + raise NotImplementedError() def get_absence_types(self) -> List[AbsenceType]: """ @@ -349,22 +345,19 @@ def get_absence(self, absence_id: int) -> Absence: """ placeholder; not ready to be used """ - # TODO implement - pass + raise NotImplementedError() def create_absence(self, absence: Absence): """ placeholder; not ready to be used """ - # TODO implement - pass + raise NotImplementedError() def delete_absence(self, absence_id: int): """ placeholder; not ready to be used """ - # TODO implement - pass + raise NotImplementedError() def _get_employee_metadata( self, path: str, resource_cls: Type[PersonioResourceType],