Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
johann-petrak committed May 1, 2023
1 parent d37e451 commit 3846b17
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gatenlp/pam/pampac/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,15 +482,15 @@ def __call__(self, succ, context=None, location=None, annset=None):

anns_to_remove = set()

for i, r in enumerate(succ._results):
for r in succ._results:

# check all matches if the they fit the conditions
for m in r.matches:
ann = m.get("ann")
for match in r.matches:
ann = match.get("ann")
if not ann:
continue
if self.name is not None:
if m.get("name") not in self.name:
if match.get("name") not in self.name:
continue
if self.type is not None:
if ann.type not in self.type:
Expand All @@ -508,4 +508,5 @@ def __call__(self, succ, context=None, location=None, annset=None):
if self.annset_name is not None:
annset = context.doc.annset(self.annset_name)

[annset.remove(ann) for ann in anns_to_remove]
for ann in anns_to_remove:
annset.remove(ann)

0 comments on commit 3846b17

Please sign in to comment.