Skip to content

Commit

Permalink
Pylint and Mypy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Mar 7, 2025
1 parent 949ea50 commit 6181bc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions install/import/femcare_patients.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
FILE_PATH = Path('files/patientinnenbuch.csv')
SPINNER = itertools.cycle(["|", "/", "-", "\\"])
COUNT = 0
# pylint: skip-file


class Entry:
Expand Down Expand Up @@ -77,8 +78,10 @@ def insert_person(self) -> Entity:
'begin_to': None,
'end_from': self.death_date}
if self.birth_year:
dates['begin_from'] = np.datetime64(self.birth_year, 'D')
dates['begin_to'] = np.datetime64(f'{self.birth_year}-12-31')
dates['begin_from'] = (
np.datetime64(self.birth_year, 'D')) # type: ignore
dates['begin_to'] = np.datetime64(
f'{self.birth_year}-12-31') # type: ignore
person_.update({'attributes': dates})
person_.link('P2', case_study)
return person_
Expand Down
5 changes: 3 additions & 2 deletions install/import/femcare_sisters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
from openatlas.api.import_scripts.util import get_exact_match
from openatlas.models.entity import Entity
from openatlas.models.type import Type
from tests.test_hierarchy import HierarchyTest

file_path = Path('files/sisters.csv')
# pylint: skip-file


class Entry:
def __init__(self, attributes: dict[str, Any]) -> None:
self.number = attributes['number']
self.name = attributes['name']
self.birthday = self.convert_str_to_date(attributes['birthday'])
self.day_of_death = self.convert_str_to_date(attributes['day_of_death'])
self.day_of_death = self.convert_str_to_date(
attributes['day_of_death'])
self.profess = self.convert_str_to_date(attributes['profess'])
self.rank = attributes['rank']
self.bio = attributes['bio']
Expand Down

0 comments on commit 6181bc3

Please sign in to comment.