diff --git a/tests/conftest.py b/tests/conftest.py index d7fb35df..5944ec70 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,7 +34,7 @@ @pytest.fixture(autouse=True) -def no_warnings(recwarn: pytest.WarningsRecorder) -> Generator[None, None, None]: +def no_warnings(recwarn: pytest.WarningsRecorder) -> Generator[None]: """Fail on warning.""" yield diff --git a/wikidict/convert.py b/wikidict/convert.py index 9c4a8f89..fc23f314 100644 --- a/wikidict/convert.py +++ b/wikidict/convert.py @@ -169,7 +169,7 @@ def dictionnary_file(self, output_file: str) -> Path: file = file.with_stem(f"{file.stem}{NO_ETYMOLOGY_SUFFIX}") return file - def handle_word(self, word: str, details: Word, **kwargs: Any) -> Generator[str, None, None]: # pragma: nocover + def handle_word(self, word: str, details: Word, **kwargs: Any) -> Generator[str]: # pragma: nocover raise NotImplementedError() def process(self) -> None: # pragma: nocover @@ -239,7 +239,7 @@ def make_groups(words: Words) -> Groups: groups[guess_prefix(word)][word] = details return groups - def handle_word(self, word: str, details: Word, **kwargs: Any) -> Generator[str, None, None]: + def handle_word(self, word: str, details: Word, **kwargs: Any) -> Generator[str]: name: str = kwargs["name"] words: Words = kwargs["words"] current_words: Words = {word: details} @@ -403,7 +403,7 @@ class DictFileFormat(BaseFormat): output_file = "dict-{locale}-{locale}.df" - def handle_word(self, word: str, details: Word, **kwargs: Any) -> Generator[str, None, None]: + def handle_word(self, word: str, details: Word, **kwargs: Any) -> Generator[str]: if details.definitions: yield self.render_word( WORD_TPL_DICTFILE, diff --git a/wikidict/lang/en/langs.py b/wikidict/lang/en/langs.py index b1049161..f6cee6a7 100644 --- a/wikidict/lang/en/langs.py +++ b/wikidict/lang/en/langs.py @@ -7542,6 +7542,8 @@ "sit-kha": "Kham", "sit-kha-pro": "Proto-Kham", "sit-khb": "Kho-Bwa", + "sit-khw": "Western Kho-Bwa", + "sit-khw-pro": "Proto-Western Kho-Bwa", "sit-kic": "Central Kiranti", "sit-kie": "Eastern Kiranti", "sit-kin": "Kinnauric", @@ -9829,7 +9831,7 @@ "zyp": "Zyphe", "zza": "Zazaki", "zzj": "Zuojiang Zhuang", -} # 9,824 +} # 9,826 # END # Missings since 2024-02-28 (see #1999 and keep synced with https://en.wiktionary.org/wiki/Module:languages/data#L-196) diff --git a/wikidict/parse.py b/wikidict/parse.py index 3fbf27de..63f5fce1 100644 --- a/wikidict/parse.py +++ b/wikidict/parse.py @@ -21,7 +21,7 @@ DEBUG_PARSE = "DEBUG_PARSE" in os.environ -def xml_iter_parse(file: Path) -> Generator[str, None, None]: +def xml_iter_parse(file: Path) -> Generator[str]: """Efficient XML parsing for big files.""" element: list[str] = [] is_element = False