Coverage for src/wiktextract/extractor/de/etymology.py: 83%
6 statements
« prev ^ index » next coverage.py v7.6.10, created at 2024-12-27 08:07 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2024-12-27 08:07 +0000
1from wikitextprocessor import WikiNode
3from ...page import clean_node
4from ...wxr_context import WiktextractContext
5from .models import WordEntry
8def extract_etymology(
9 wxr: WiktextractContext,
10 word_entry: WordEntry,
11 level_node: WikiNode,
12) -> None:
13 word_entry.etymology_text = (
14 clean_node(wxr, word_entry, level_node.children)
15 .removeprefix(":")
16 .strip()
17 )