From f732656f0cb9ed8314d106aa2411d26ac6b73638 Mon Sep 17 00:00:00 2001 From: Carson Lam Date: Wed, 16 Aug 2023 16:11:36 -0700 Subject: [PATCH] no_implicit_optional --- src/together/files.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/together/files.py b/src/together/files.py index 68a82d7d..97b1b010 100644 --- a/src/together/files.py +++ b/src/together/files.py @@ -2,7 +2,7 @@ import os import posixpath import urllib.parse -from typing import Dict, List, Union +from typing import Optional, Dict, List, Union import requests from tqdm import tqdm @@ -46,7 +46,7 @@ def list(self) -> Dict[str, List[Dict[str, Union[str, int]]]]: return response_json @classmethod - def check(self, file: str, model: str = None) -> Dict[str, Union[str, int]]: + def check(self, file: str, model: Optional[str] = None) -> Dict[str, Union[str, int]]: return check_json(file, model) @classmethod @@ -54,7 +54,7 @@ def upload( self, file: str, check: bool = True, - model: str = None, + model: Optional[str] = None, ) -> Dict[str, Union[str, int]]: data = {"purpose": "fine-tune", "file_name": os.path.basename(file)} @@ -276,7 +276,7 @@ def load_jsonl(self, input_path: str) -> List[Dict[str, str]]: def check_json( file: str, - model: str = None, + model: Optional[str] = None, ) -> Dict[str, Union[str, int, bool, list, dict]]: report_dict = {"is_check_passed": True}