Skip to content

Commit

Permalink
Update set_file_paths to explicitly check if the paths are not None, …
Browse files Browse the repository at this point in the history
…instead of using assert
  • Loading branch information
LobaDK committed Aug 23, 2024
1 parent a8fe427 commit 9d3a403
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions settings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ def set_file_paths(
if path:
read_path = path
write_path = path
assert read_path is not None and write_path is not None
return Path(read_path).resolve(), Path(write_path).resolve()

if read_path is not None and write_path is not None:
return Path(read_path).resolve(), Path(write_path).resolve()
else:
raise MissingPathError("You must provide both a read_path and write_path.")


@overload
Expand Down

0 comments on commit 9d3a403

Please sign in to comment.