Skip to content

Commit

Permalink
Use Union instead of |
Browse files Browse the repository at this point in the history
  • Loading branch information
Arsh Zahed authored and Arsh Zahed committed Aug 28, 2024
1 parent 5f504ed commit fe40c59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/together/cli/api/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
from together.utils import finetune_price_to_dollars, log_warn, parse_timestamp
from together.types.finetune import DownloadCheckpointType

from typing import Union


class DownloadCheckpointTypeChoice(click.Choice):
def __init__(self) -> None:
super().__init__([ct.value for ct in DownloadCheckpointType])

def convert(
self, value: str, param: click.Parameter | None, ctx: click.Context | None
self,
value: str,
param: Union[click.Parameter, None],
ctx: Union[click.Context, None],
) -> DownloadCheckpointType:
value = super().convert(value, param, ctx)
return DownloadCheckpointType(value)
Expand Down

0 comments on commit fe40c59

Please sign in to comment.