Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomilov committed Feb 11, 2025
1 parent 1a041c0 commit 3e8394a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion h/services/mention.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def update_mentions(self, annotation: Annotation) -> None:
if mentioning_user.nipsa:
return

mentioned_userids = OrderedDict.fromkeys(self._parse_userids(annotation.text)).keys()
mentioned_userids = OrderedDict.fromkeys(
self._parse_userids(annotation.text)
).keys()
mentioned_users = self._user_service.fetch_all(mentioned_userids)
self._session.execute(
delete(Mention).where(Mention.annotation_id == annotation.id)
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/h/services/mention_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def test_update_mentions_with_private_annotation(self, service, annotation):

assert len(annotation.mentions) == 0

def test_update_mentions_with_own_mention(self, service, annotation, user_service, mentioning_user):
def test_update_mentions_with_own_mention(
self, service, annotation, user_service, mentioning_user
):
user_service.fetch_all.return_value = [mentioning_user]

service.update_mentions(annotation)
Expand Down

0 comments on commit 3e8394a

Please sign in to comment.