diff options
| author | Rapptz <[email protected]> | 2021-06-28 21:55:41 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-06-28 23:36:20 -0400 |
| commit | f9bccabac5e205bccff3035a9bb7c5a31baf9acb (patch) | |
| tree | 1efb90ce9330095f262c1eb9d00977c8ca707fe8 /discord/asset.py | |
| parent | Make Asset.replace only accept keyword arguments (diff) | |
| download | discord.py-f9bccabac5e205bccff3035a9bb7c5a31baf9acb.tar.xz discord.py-f9bccabac5e205bccff3035a9bb7c5a31baf9acb.zip | |
Make Asset.with_ functions positional only
Diffstat (limited to 'discord/asset.py')
| -rw-r--r-- | discord/asset.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/asset.py b/discord/asset.py index 11780145..e8381189 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -311,7 +311,7 @@ class Asset(AssetMixin): url = str(url) return Asset(state=self._state, url=url, key=self._key, animated=self._animated) - def with_size(self, size: int) -> Asset: + def with_size(self, size: int, /) -> Asset: """Returns a new asset with the specified size. Parameters @@ -335,7 +335,7 @@ class Asset(AssetMixin): url = str(yarl.URL(self._url).with_query(size=size)) return Asset(state=self._state, url=url, key=self._key, animated=self._animated) - def with_format(self, format: ValidAssetFormatTypes) -> Asset: + def with_format(self, format: ValidAssetFormatTypes, /) -> Asset: """Returns a new asset with the specified format. Parameters @@ -366,7 +366,7 @@ class Asset(AssetMixin): 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) - def with_static_format(self, format: ValidStaticFormatTypes) -> Asset: + def with_static_format(self, format: ValidStaticFormatTypes, /) -> Asset: """Returns a new asset with the specified static format. This only changes the format if the underlying asset is |