Skip to content

Commit

Permalink
Apple code suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Dorukyum <[email protected]>
Signed-off-by: Middledot <[email protected]>
  • Loading branch information
Middledot and Dorukyum authored Nov 29, 2023
1 parent cd73447 commit dfb2bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,11 +564,11 @@ async def dispatch_error(self, ctx: Context, error: Exception) -> None:

async def transform(self, ctx: Context, param: inspect.Parameter) -> Any:
if isinstance(param.annotation, Option):
required = param.annotation.required or param.annotation.default is None
default = param.annotation.default
required = param.annotation.required or default is None
else:
required = param.default is param.empty
default = param.default
required = default is param.empty

converter = get_converter(param)
consume_rest_is_special = (
Expand Down

0 comments on commit dfb2bf1

Please sign in to comment.