File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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:
Original file line number Diff line number Diff 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()):
Original file line number Diff line number Diff line change 2020from jinja2 import TemplateSyntaxError
2121from jinja2 .sandbox import ImmutableSandboxedEnvironment
2222from datetime import datetime
23+ from typing import Callable
2324
2425
2526def 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 )
You can’t perform that action at this time.
0 commit comments