Skip to content

Commit

Permalink
fix: default None value for optional configs on file
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikita95 committed Jul 15, 2024
1 parent e45e8b4 commit 6ae9337
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/writer/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def download(self) -> BinaryAPIResponse:
return files.download(self.id)


def retrieve_file(file_id: str, config: Optional[APIOptions]) -> File:
def retrieve_file(file_id: str, config: Optional[APIOptions] = None) -> File:
config = config or {}
files = File._retrieve_files_accessor()
file_object = files.retrieve(file_id, **config)
Expand Down Expand Up @@ -406,7 +406,7 @@ def upload_file(

def delete_file(
file_id_or_file: Union['File', str],
config: Optional[APIOptions]
config: Optional[APIOptions] = None
) -> FileDeleteResponse:
config = config or {}
file_id = None
Expand Down

0 comments on commit 6ae9337

Please sign in to comment.