Fix typing to be compatible with later py versions (#32155)

This commit is contained in:
amyeroberts 2024-07-23 12:23:34 +01:00 committed by GitHub
parent 3263b34354
commit a009fbdab3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1948,7 +1948,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
return self._rendered_blocks or self._generation_indices
@contextmanager
def activate_tracker(self, rendered_blocks: list[int], generation_indices: list[int]):
def activate_tracker(self, rendered_blocks: List[int], generation_indices: List[int]):
try:
if self.is_active():
raise ValueError("AssistantTracker should not be reused before closed")