From 3846b172e980e3a569b1fb9634aeb8f0d05fb738 Mon Sep 17 00:00:00 2001 From: Johann Petrak Date: Mon, 1 May 2023 20:19:14 +0200 Subject: [PATCH] Code style --- gatenlp/pam/pampac/actions.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gatenlp/pam/pampac/actions.py b/gatenlp/pam/pampac/actions.py index e2c1e71..cf3f290 100644 --- a/gatenlp/pam/pampac/actions.py +++ b/gatenlp/pam/pampac/actions.py @@ -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: @@ -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] \ No newline at end of file + for ann in anns_to_remove: + annset.remove(ann)