Skip to content

Commit

Permalink
Merged Mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Apr 16, 2024
1 parent 25175ba commit 446c7d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openatlas/forms/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class Form(FlaskForm):


def get_annotation_form(
image_id,
image_id: int,
entity: Optional[Entity] = None,
insert: Optional[bool] = True):
insert: Optional[bool] = True) -> FlaskForm:
class Form(FlaskForm):
text = TextAreaField(_('annotation'))
if insert:
Expand Down
4 changes: 2 additions & 2 deletions openatlas/forms/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AcquisitionManager(EventBaseManager):
_('given artifact')

def additional_fields(self) -> dict[str, Any]:
data = {'place': [], 'artifact': []}
data: dict[str, list[Any]] = {'place': [], 'artifact': []}
if not self.insert:
for entity in self.entity.get_linked_entities('P24'):
data[
Expand Down Expand Up @@ -425,7 +425,7 @@ def additional_fields(self) -> dict[str, Any]:
fields = super().additional_fields()
place_from = None
place_to = None
data = {'artifact': [], 'person': []}
data: dict[str, list[Any]] = {'artifact': [], 'person': []}
if self.entity:
if place := self.entity.get_linked_entity('P27'):
place_from = place.get_linked_entity_safe('P53', True)
Expand Down

0 comments on commit 446c7d8

Please sign in to comment.