Skip to content

Commit

Permalink
no_implicit_optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Carson Lam authored and Carson Lam committed Aug 16, 2023
1 parent 03e5ce2 commit f732656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/together/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -46,15 +46,15 @@ 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
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)}

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

Expand Down

0 comments on commit f732656

Please sign in to comment.