Skip to content

Commit 8805303

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent 7fb1a4b commit 8805303

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ These changes are available on the `master` branch, but have not yet been releas
2424
([#2556](https://github.com/Pycord-Development/pycord/pull/2556))
2525

2626
### Fixed
27+
2728
- Fix `Enum` options not setting the correct type when only one choice is available.
2829
([#2575](https://github.com/Pycord-Development/pycord/pull/2575))
2930

@@ -50,8 +51,8 @@ These changes are available on the `master` branch, but have not yet been releas
5051
([#2555](https://github.com/Pycord-Development/pycord/pull/2555))
5152
- Fixed missing `stacklevel` parameter in `warn_deprecated` function call inside
5253
`@utils.deprecated`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
53-
- Fixed the type hint in `ConnectionState._polls` to reflect actual behavior, changing it
54-
from `Guild` to `Poll`.
54+
- Fixed the type hint in `ConnectionState._polls` to reflect actual behavior, changing
55+
it from `Guild` to `Poll`.
5556
([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
5657
- Fixed missing `__slots__` attributes in `RawReactionClearEmojiEvent` and
5758
`RawMessagePollVoteEvent`.

discord/commands/options.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ 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 (enum_choices[0].value.__class__ in SlashCommandOptionType.__members__ and
213-
all(isinstance(elem.value, value_class) for elem in enum_choices)):
212+
if enum_choices[
213+
0
214+
].value.__class__ in SlashCommandOptionType.__members__ and all(
215+
isinstance(elem.value, value_class) for elem in enum_choices
216+
):
214217
input_type = SlashCommandOptionType.from_datatype(
215218
enum_choices[0].value.__class__
216219
)

0 commit comments

Comments
 (0)