Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream_sirex/enum-names' into enum-names
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Sep 11, 2024
2 parents eee3a4c + 478d183 commit b5bd589
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions typer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ def get_command_from_info(
return command


def determine_type_convertor(type_: Any, enum_by_name: bool) -> Optional[Callable[[Any], Any]]:
def determine_type_convertor(
type_: Any, enum_by_name: bool
) -> Optional[Callable[[Any], Any]]:
convertor: Optional[Callable[[Any], Any]] = None
if lenient_issubclass(type_, Path):
convertor = param_path_convertor
Expand Down Expand Up @@ -671,7 +673,8 @@ def internal_convertor(value: Sequence[Any]) -> Optional[List[Any]]:


def generate_tuple_convertor(
types: Sequence[Any], enum_by_name: bool,
types: Sequence[Any],
enum_by_name: bool,
) -> Callable[[Optional[Tuple[Any, ...]]], Optional[Tuple[Any, ...]]]:
convertors = [determine_type_convertor(type_, enum_by_name) for type_ in types]

Expand Down

0 comments on commit b5bd589

Please sign in to comment.