From f32b28a1fe04b84ab6144552c7aadcdb3c2f3784 Mon Sep 17 00:00:00 2001 From: Sunwook Jung Date: Mon, 21 Oct 2024 22:27:42 +0900 Subject: [PATCH] bugfix huggingface-cli command execution in python3.8 (#2620) * bugfix generic type in python 3.8 * run style --------- Co-authored-by: Celina Hanouti --- src/huggingface_hub/commands/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/huggingface_hub/commands/user.py b/src/huggingface_hub/commands/user.py index c1498c918d..9741a219f1 100644 --- a/src/huggingface_hub/commands/user.py +++ b/src/huggingface_hub/commands/user.py @@ -36,7 +36,7 @@ import subprocess from argparse import _SubParsersAction -from typing import Optional +from typing import List, Optional from requests.exceptions import HTTPError @@ -200,7 +200,7 @@ def _select_token_name(self) -> Optional[str]: except ValueError: print("Invalid input. Please enter a number or 'q' to quit.") - def _select_token_name_tui(self, token_names: list[str]) -> Optional[str]: + def _select_token_name_tui(self, token_names: List[str]) -> Optional[str]: choices = [Choice(token_name, name=token_name) for token_name in token_names] try: return inquirer.select(