Skip to content

Commit bc228f7

Browse files
committed
linting fix
1 parent 333b2cc commit bc228f7

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

structflo/ner/extractor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ def _filter_extractions(
146146
kept.append(ext)
147147
else:
148148
logger.warning(
149-
"Dropping extraction with unknown class %r (text=%r). "
150-
"Allowed classes: %s",
149+
"Dropping extraction with unknown class %r (text=%r). Allowed classes: %s",
151150
ext.extraction_class,
152151
ext.extraction_text,
153152
", ".join(sorted(allowed_classes)),

tests/test_extractor.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ def test_keeps_valid_extractions(self):
145145
lx.data.Extraction(extraction_class="target", extraction_text="COX-2"),
146146
]
147147
)
148-
filtered = NERExtractor._filter_extractions(
149-
doc, {"compound_name", "target"}
150-
)
148+
filtered = NERExtractor._filter_extractions(doc, {"compound_name", "target"})
151149
assert len(filtered.extractions) == 2
152150

153151
def test_drops_hallucinated_classes(self):
@@ -158,9 +156,7 @@ def test_drops_hallucinated_classes(self):
158156
lx.data.Extraction(extraction_class="toxicity", extraction_text="hepatotoxic"),
159157
]
160158
)
161-
filtered = NERExtractor._filter_extractions(
162-
doc, {"compound_name", "target"}
163-
)
159+
filtered = NERExtractor._filter_extractions(doc, {"compound_name", "target"})
164160
assert len(filtered.extractions) == 1
165161
assert filtered.extractions[0].extraction_text == "Aspirin"
166162

0 commit comments

Comments
 (0)