Skip to content

Commit

Permalink
More type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
multimeric committed Aug 21, 2024
1 parent 9d91198 commit ccd52b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions filesender/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Iterable, List, Optional, Tuple, AsyncIterator
from typing import Any, Iterable, List, Optional, Tuple, AsyncIterator, Union
from filesender.download import files_from_page, DownloadFile
import filesender.response_types as response
import filesender.request_types as request
Expand Down Expand Up @@ -366,7 +366,7 @@ async def download_file(
token: str,
file_id: int,
out_dir: Path,
file_size: int | float = float("inf"),
file_size: Union[int, float] = float("inf"),
file_name: Optional[str] = None
) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion filesender/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def convert(self, value: Union[int, str], param: Union[Parameter, None], ctx: Un

return LogLevel[value].value

def get_metavar(self, param: Parameter) -> str | None:
def get_metavar(self, param: Parameter) -> Union[str, None]:
# Print out the choices
return "|".join(LogLevel._member_map_)

0 comments on commit ccd52b7

Please sign in to comment.