Skip to content

Commit

Permalink
Use Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf authored Dec 28, 2024
1 parent 3aaac83 commit d1249c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/utils/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def private_ip_check(url: str):

async def get_url(
url: str,
status_code: Union[int, None] = 200,
status_code: Optional[int] = 200,
headers: Optional[Dict[str, Any]] = None,
params: Optional[Dict[str, Any]] = None,
fmt: Optional[str] = None,
Expand Down Expand Up @@ -124,7 +124,7 @@ async def get_():
async def post_url(
url: str,
data: Any = None,
status_code: int = 200,
status_code: Optional[int] = 200,
headers: Optional[Dict[str, Any]] = None,
fmt: Optional[str] = None,
timeout: Optional[float] = 20,
Expand Down Expand Up @@ -200,7 +200,7 @@ async def download(
url: str,
filename: Optional[str] = None,
path: Optional[str] = None,
status_code: int = 200,
status_code: Optional[int] = 200,
method: str = "GET",
post_data: Any = None,
headers: Optional[Dict[str, Any]] = None,
Expand Down

0 comments on commit d1249c5

Please sign in to comment.