mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Update pyright version
This commit is contained in:
@ -429,7 +429,7 @@ class Asset(AssetMixin):
|
||||
url = url.with_query(url.raw_query_string)
|
||||
|
||||
url = str(url)
|
||||
return Asset(state=self._state, url=url, key=self._key, animated=self._animated)
|
||||
return self.__class__(state=self._state, url=url, key=self._key, animated=self._animated)
|
||||
|
||||
def with_size(self, size: int, /) -> Self:
|
||||
"""Returns a new asset with the specified size.
|
||||
@ -457,7 +457,7 @@ class Asset(AssetMixin):
|
||||
raise ValueError('size must be a power of 2 between 16 and 4096')
|
||||
|
||||
url = str(yarl.URL(self._url).with_query(size=size))
|
||||
return Asset(state=self._state, url=url, key=self._key, animated=self._animated)
|
||||
return self.__class__(state=self._state, url=url, key=self._key, animated=self._animated)
|
||||
|
||||
def with_format(self, format: ValidAssetFormatTypes, /) -> Self:
|
||||
"""Returns a new asset with the specified format.
|
||||
@ -492,7 +492,7 @@ class Asset(AssetMixin):
|
||||
url = yarl.URL(self._url)
|
||||
path, _ = os.path.splitext(url.path)
|
||||
url = str(url.with_path(f'{path}.{format}').with_query(url.raw_query_string))
|
||||
return Asset(state=self._state, url=url, key=self._key, animated=self._animated)
|
||||
return self.__class__(state=self._state, url=url, key=self._key, animated=self._animated)
|
||||
|
||||
def with_static_format(self, format: ValidStaticFormatTypes, /) -> Self:
|
||||
"""Returns a new asset with the specified static format.
|
||||
|
Reference in New Issue
Block a user