fix: is_owner() user type hint#2593
Merged
Lulalaby merged 2 commits intoPycord-Development:masterfrom Sep 30, 2024
Merged
Conversation
The `user` parameter must accept both a `User` and a `Member`, as the docstring itself says. Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com>
Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com>
user type hintis_owner() user type hint
Dorukyum
approved these changes
Sep 30, 2024
Lulalaby
approved these changes
Sep 30, 2024
NeloBlivion
added a commit
to NeloBlivion/pycord
that referenced
this pull request
Oct 4, 2024
This reverts commit c430fbb.
9 tasks
baribarton
pushed a commit
to baribarton/pycord-no-potential-reconnect
that referenced
this pull request
Oct 24, 2024
* fix(is_owner) `user` type hint The `user` parameter must accept both a `User` and a `Member`, as the docstring itself says. Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com> --------- Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com>
OmLanke
pushed a commit
to OmLanke/pycord
that referenced
this pull request
Dec 16, 2024
* fix(is_owner) `user` type hint The `user` parameter must accept both a `User` and a `Member`, as the docstring itself says. Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com> --------- Signed-off-by: balaclava <71716568+controlado@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
userparameter must accept both aUserand aMember, as the docstring itself says. In practice, it solves this error:Argument 1 to "is_owner" of "BotBase" has incompatible type "User | Member"; expected "User"mypyarg-type.Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.