Skip to content

Commit

Permalink
added docstring for session
Browse files Browse the repository at this point in the history
  • Loading branch information
Md Shahriyar Alam committed Dec 1, 2023
1 parent 06a110c commit 365c573
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 59 deletions.
4 changes: 3 additions & 1 deletion easy_pil/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ def load_image(link: str) -> Image.Image:


@cached(ttl=60 * 60 * 24)
async def load_image_async(link: str, session=None) -> Image.Image:
async def load_image_async(link: str, session: aiohttp.ClientSession = None) -> Image.Image:

Check failure on line 46 in easy_pil/utils.py

View workflow job for this annotation

GitHub Actions / pyright (3.8, false)

Expression of type "None" cannot be assigned to parameter of type "ClientSession"   "None" is incompatible with "ClientSession" (reportGeneralTypeIssues)
"""Load image from link (async)
Parameters
----------
link : str
Image from the provided link (if any)
session: aiohttp.ClientSession
clientSession for making requests, defaults to None
Returns
-------
Expand Down
Loading

0 comments on commit 365c573

Please sign in to comment.