0

I have this function async def profile(self, ctx, region, *, summoner) and I'm trying to call it from another function with await self.profile(ctx, region, summoner), and it gives an error:

> Too many positional arguments for method callpylint Missing mandatory
> keyword argument 'summoner' in method callpylint

The problem is with the " * " in the profile function. How can I make this work without removing it?

1 Answer 1

2

A Bare star (*) is used to force the caller to use named arguments. You can refer to the doc here for further details.

Update the call as follows,

await self.profile(ctx, region, summoner=summoner)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.