Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: is_owner() user type hint #2593

Merged
merged 2 commits into from
Sep 30, 2024
Merged

Conversation

controlado
Copy link
Contributor

@controlado controlado commented Sep 30, 2024

Summary

The user parameter must accept both a User and a Member, 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

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
  • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

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>
@controlado controlado changed the title fix(is_owner) user type hint fix: is_owner() user type hint Sep 30, 2024
@controlado controlado marked this pull request as ready for review September 30, 2024 03:03
@controlado controlado requested a review from a team as a code owner September 30, 2024 03:03
@Lulalaby Lulalaby merged commit c430fbb into Pycord-Development:master Sep 30, 2024
15 of 29 checks passed
NeloBlivion added a commit to NeloBlivion/pycord that referenced this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants