Skip to content

Commit 6118c04

Browse files
authored
ci : bump ty to 0.0.33 (ggml-org#22535)
* bump ty to 0.0.33 * update typings
1 parent 5f0ab72 commit 6118c04

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/python-type-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/setup-python@v6
3232
with:
3333
python-version: "3.11"
34-
pip-install: -r requirements/requirements-all.txt ty==0.0.26
34+
pip-install: -r requirements/requirements-all.txt ty==0.0.33
3535
# - name: Type-check with Pyright
3636
# uses: jakebailey/pyright-action@v2
3737
# with:

convert_hf_to_gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6658,7 +6658,7 @@ def _xlmroberta_set_vocab(self) -> None:
66586658

66596659
tokens: list[bytes] = [f"[PAD{i}]".encode("utf-8") for i in range(vocab_size)]
66606660
scores: list[float] = [-10000.0] * vocab_size
6661-
toktypes: list[int] = [SentencePieceTokenTypes.UNUSED] * vocab_size # ty: ignore[invalid-assignment]
6661+
toktypes: list[int] = [SentencePieceTokenTypes.UNUSED] * vocab_size
66626662

66636663
if isinstance(tokenizer, SentencePieceProcessor):
66646664
for token_id in range(tokenizer.vocab_size()):

scripts/jinja/jinja-tester.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from jinja2 import TemplateSyntaxError
2121
from jinja2.sandbox import ImmutableSandboxedEnvironment
2222
from datetime import datetime
23+
from typing import Callable
2324

2425

2526
def format_template_content(template_content):
@@ -395,7 +396,7 @@ def raise_exception(text: str) -> str:
395396
ensure_ascii=ensure_ascii,
396397
)
397398
)
398-
env.globals["strftime_now"] = lambda format: datetime.now().strftime(format) # ty: ignore[invalid-assignment]
399+
env.globals["strftime_now"]: Callable[[str], str] = lambda format: datetime.now().strftime(format)
399400
env.globals["raise_exception"] = raise_exception # ty: ignore[invalid-assignment]
400401
try:
401402
template = env.from_string(template_str)

0 commit comments

Comments
 (0)