Skip to content

Commit e7b9d28

Browse files
committed
fix: merge conflicts
2 parents 83e3aad + f4d5624 commit e7b9d28

File tree

3 files changed

+36
-15
lines changed

3 files changed

+36
-15
lines changed

CHANGELOG.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ possible (see our [Version Guarantees] for more info).
1010

1111
These changes are available on the `master` branch, but have not yet been released.
1212

13-
⚠️ **This Version Removes Support For Python 3.8** ⚠️
13+
⚠️ **This version removes support for Python 3.8.** ⚠️
1414

1515
### Added
1616

@@ -23,39 +23,50 @@ These changes are available on the `master` branch, but have not yet been releas
2323
- Added `Member.guild_banner` and `Member.display_banner` properties.
2424
([#2556](https://github.com/Pycord-Development/pycord/pull/2556))
2525

26+
### Fixed
27+
28+
- Fix `Enum` options not setting the correct type when only one choice is available.
29+
([#2577](https://github.com/Pycord-Development/pycord/pull/2577))
30+
2631
### Changed
2732

2833
- Renamed `cover` property of `ScheduledEvent` and `cover` argument of
2934
`ScheduledEvent.edit` to `image`.
3035
([#2496](https://github.com/Pycord-Development/pycord/pull/2496))
31-
- ⚠️ **This Version Removes Support For Python 3.8** ⚠️
36+
- ⚠️ **Removed support for Python 3.8.**
3237
([#2521](https://github.com/Pycord-Development/pycord/pull/2521))
3338

3439
### Deprecated
3540

3641
- Deprecated `AppInfo.summary` in favor of `AppInfo.description`.
3742
([#2520](https://github.com/Pycord-Development/pycord/pull/2520))
3843

44+
## [2.6.1] - 2024-09-15
45+
3946
### Fixed
4047

41-
- Fixed `EntitlementIterator` behavior with `limit > 100`.
48+
- Fixed premature garbage collection of tasks.
49+
([#2510](https://github.com/Pycord-Development/pycord/pull/2510))
50+
- Fixed `EntitlementIterator` type hints and behavior with `limit > 100`.
4251
([#2555](https://github.com/Pycord-Development/pycord/pull/2555))
4352
- Fixed missing `stacklevel` parameter in `warn_deprecated` function call inside
4453
`@utils.deprecated`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
45-
- Fixed the typehint in `ConnectionState._polls` to reflect actual behavior, changing it
46-
from `Guild` to `Poll`.
54+
- Fixed the type hint in `ConnectionState._polls` to reflect actual behavior, changing
55+
it from `Guild` to `Poll`.
4756
([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
4857
- Fixed missing `__slots__` attributes in `RawReactionClearEmojiEvent` and
4958
`RawMessagePollVoteEvent`.
5059
([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
5160
- Fixed the type of `ForumChannel.default_sort_order`, changing it from `int` to
5261
`SortOrder`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
53-
- Fixed `PartialMessage`s causing errors when created from `PartialMessageable`.
62+
- Fixed `PartialMessage` causing errors when created from `PartialMessageable`.
5463
([#2568](https://github.com/Pycord-Development/pycord/pull/2500))
5564
- Fixed the `guild` attribute of `Member`s recieved from a `UserCommand` being `None`.
5665
([#2573](https://github.com/Pycord-Development/pycord/pull/2573))
57-
- Fixed `Webhook.send` not including `Attachment` data.
66+
- Fixed `Webhook.send` not including attachment data.
5867
([#2513](https://github.com/Pycord-Development/pycord/pull/2513))
68+
- Fixed inverted type hints in `CheckAnyFailure`.
69+
([#2502](https://github.com/Pycord-Development/pycord/pull/2502))
5970

6071
## [2.6.0] - 2024-07-09
6172

discord/commands/options.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def __init__(
198198
enum_choices = []
199199
input_type_is_class = isinstance(input_type, type)
200200
if input_type_is_class and issubclass(input_type, (Enum, DiscordEnum)):
201-
if description is None:
201+
if description is None and input_type.__doc__ is not None:
202202
description = inspect.cleandoc(input_type.__doc__)
203203
if description and len(description) > 100:
204204
description = description[:97] + "..."
@@ -209,7 +209,9 @@ def __init__(
209209
)
210210
enum_choices = [OptionChoice(e.name, e.value) for e in input_type]
211211
value_class = enum_choices[0].value.__class__
212-
if all(isinstance(elem.value, value_class) for elem in enum_choices):
212+
if value_class in SlashCommandOptionType.__members__ and all(
213+
isinstance(elem.value, value_class) for elem in enum_choices
214+
):
213215
input_type = SlashCommandOptionType.from_datatype(
214216
enum_choices[0].value.__class__
215217
)

discord/http.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,17 @@ async def static_login(self, token: str) -> user.User:
413413
# TODO: Remove This When Testing Is Done
414414
import logging
415415

416-
async def on_request_start(session, context, params: aiohttp.TraceRequestStartParams):
416+
async def on_request_start(
417+
session, context, params: aiohttp.TraceRequestStartParams
418+
):
417419
# breakpoint()
418-
logging.getLogger('aiohttp.client').debug(f'Starting request <{params}> <{session}> <{context}>')
420+
logging.getLogger("aiohttp.client").debug(
421+
f"Starting request <{params}> <{session}> <{context}>"
422+
)
419423

420-
async def on_request_chunk_sent(session, context, params: aiohttp.TraceRequestChunkSentParams):
424+
async def on_request_chunk_sent(
425+
session, context, params: aiohttp.TraceRequestChunkSentParams
426+
):
421427
with open("output.txt", "a") as file:
422428
if byte := str(params.chunk).find(r"\x", 100) != -1:
423429
file.write(str(params.chunk)[:byte] + "\n")
@@ -431,7 +437,9 @@ async def on_request_chunk_sent(session, context, params: aiohttp.TraceRequestCh
431437

432438
# Necessary to get aiohttp to stop complaining about session creation
433439
self.__session = aiohttp.ClientSession(
434-
connector=self.connector, ws_response_class=DiscordClientWebSocketResponse, trace_configs=[trace_config]
440+
connector=self.connector,
441+
ws_response_class=DiscordClientWebSocketResponse,
442+
trace_configs=[trace_config],
435443
)
436444
old_token = self.token
437445
self.token = token
@@ -659,8 +667,8 @@ def edit_multipart_helper(
659667
"id": index,
660668
"filename": file.filename,
661669
"description": file.description,
662-
"waveform": "AADz/+z/Pf+jBCD8pQE++8sDOv5H/WAH6PvR/uP8mfGCGnkCnAg58y77ewGH/U79AwXc9yUGlvloFmcF5fx9+kwFMQV8+GYDaf1oAToEmfm9APcB7gWs/mYEGgB5/VT9sfv3AAYCBALl/kX9jgDsA6UCLvtABNv/g/65/QP+xf2QAxsA8gKI/J3+1f5vBcAC5/ps/mQDigGn+FcEZAIZ/lYClP3a/rwEw/2g++wDpPoMB/36jAKPAC7+2wFo/IoBMgG2Aib9ivxqBFn7JwBn/LUEHP1R/T4EYv77AIoBd/wRBRX+DvwTA+4C0/l3AHQEiv98+n8B1wPj/DkA/gGp/zr7GQJv/HwAevlPBon8UP7bAyj/uAJp/SsCjPssAif/kP7bBIn9sQHq/9j94/+aADH+KQCcASj/1gHr/uYA/P1UAiz+XgEkANL9GgG8Adr+Mv/H/w8BgP+aASf+bAAgAE0AS/4hAWUASP/VAE3/5P5tAd39fQLq/zD/wADU/sgAo//T/zQBg/6nANf/8v/IAHH/iQCd/wQAEACa/3cA8v/s/x8A4v///xkA2v8QAA8A7P8LAPz/AAABAP3/AAAAAP//AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
663-
"duration_secs": 10.032
670+
"waveform": "37WKcJ6jlLSVnaabsbeip4KPmHJXUUEbExgFJE8J7iNPFggpKQkTNl95dobFqqe2tKubnbSTX3yLVVBFS4iqd4dbKmFvMChwfVRKfWFYWRpLaV9jlYtKWWZde6mtnYiDlGNUgmFAWWdRXGNsf2NBYnNcS1uDjm+qwK2urKe8uKqjZ2KGSjtbLUpTO0iDYSBSg6CzCk1LNDVAZnOAvNiUkLu8r8vPnFw6bXZbbXcn0vUU8q2q38Olyfb0y7OhlnV9u6N4zuAH9uI=",
671+
"duration_secs": 60.0,
664672
}
665673
)
666674
form.append(

0 commit comments

Comments
 (0)