mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
Fix some type ignores in backoff and channel
This commit is contained in:
parent
c7c6d74d8d
commit
6c2ea4f0a0
@ -72,7 +72,7 @@ class ExponentialBackoff(Generic[T]):
|
|||||||
rand = random.Random()
|
rand = random.Random()
|
||||||
rand.seed()
|
rand.seed()
|
||||||
|
|
||||||
self._randfunc: Callable[..., Union[int, float]] = rand.randrange if integral else rand.uniform # type: ignore
|
self._randfunc: Callable[..., Union[int, float]] = rand.randrange if integral else rand.uniform
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def delay(self: ExponentialBackoff[Literal[False]]) -> float:
|
def delay(self: ExponentialBackoff[Literal[False]]) -> float:
|
||||||
|
@ -584,7 +584,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
|||||||
from .webhook import Webhook
|
from .webhook import Webhook
|
||||||
|
|
||||||
if avatar is not None:
|
if avatar is not None:
|
||||||
avatar = utils._bytes_to_base64_data(avatar) # type: ignore
|
avatar = utils._bytes_to_base64_data(avatar) # type: ignore - Silence reassignment error
|
||||||
|
|
||||||
data = await self._state.http.create_webhook(self.id, name=str(name), avatar=avatar, reason=reason)
|
data = await self._state.http.create_webhook(self.id, name=str(name), avatar=avatar, reason=reason)
|
||||||
return Webhook.from_state(data, state=self._state)
|
return Webhook.from_state(data, state=self._state)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user