23
23
from __future__ import annotations
24
24
25
25
import datetime
26
- from typing import List , Literal , Optional , Sequence , overload
26
+ from typing import List , Literal , Optional , Sequence , Union , overload
27
27
28
28
import aiohttp
29
29
@@ -182,7 +182,9 @@ async def get_paste(self, paste_id: str, *, password: Optional[str] = ..., raw:
182
182
async def get_paste (self , paste_id : str , * , password : Optional [str ] = ..., raw : Literal [True ]) -> list [str ]:
183
183
...
184
184
185
- async def get_paste (self , paste_id : str , * , password : Optional [str ] = None , raw : bool = False ) -> Paste | list [str ]:
185
+ async def get_paste (
186
+ self , paste_id : str , * , password : Optional [str ] = None , raw : bool = False
187
+ ) -> Union [Paste , list [str ]]:
186
188
"""|coro|
187
189
188
190
Fetch a paste.
@@ -193,6 +195,14 @@ async def get_paste(self, paste_id: str, *, password: Optional[str] = None, raw:
193
195
The paste id to fetch.
194
196
password: Optional[:class:`str`]
195
197
The password of the paste, if any.
198
+ raw: :class:`bool`
199
+ Whether to return the raw file(s) content or a :class:`~mystbin.Paste` instance.
200
+ Defaults to ``False``.
201
+
202
+ Returns
203
+ --------
204
+ Union[:class:`~mystbin.Paste`, List[:class:`str`]]
205
+ The paste data returned.
196
206
"""
197
207
data = await self .http .get_paste (paste_id = paste_id , password = password )
198
208
if raw :
0 commit comments