Skip to content

Commit

Permalink
Update locale-specific data
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Nov 23, 2024
1 parent a716eaa commit 5cba7b4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions wikidict/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion wikidict/lang/en/langs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion wikidict/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cba7b4

Please sign in to comment.