Skip to content

Commit

Permalink
bugfix huggingface-cli command execution in python3.8 (#2620)
Browse files Browse the repository at this point in the history
* bugfix generic type in python 3.8

* run style

---------

Co-authored-by: Celina Hanouti <[email protected]>
  • Loading branch information
PineApple777 and hanouticelina committed Oct 21, 2024
1 parent 126750f commit f32b28a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/huggingface_hub/commands/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

import subprocess
from argparse import _SubParsersAction
from typing import Optional
from typing import List, Optional

from requests.exceptions import HTTPError

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit f32b28a

Please sign in to comment.