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

Inconsistency with type hinting create_x_channel methods and underlying _create_channel method #1162

Closed
3 tasks done
dlchamp opened this issue Mar 2, 2024 · 0 comments · Fixed by #1163
Closed
3 tasks done
Labels
bug Something isn't working t: refactor/typing/lint Refactors, typing changes and/or linting changes
Milestone

Comments

@dlchamp
Copy link
Contributor

dlchamp commented Mar 2, 2024

Summary

Inconsistency with type hinting create_x_channel methods and underlying _create_channel method

Reproduction Steps

Create a new text, voice, or any guild channel within a category.

await guild.create_text_channel("Test", category=disnake.Object(909112625894420550))

While this does actually work, pylance and pyright yell about it.

Minimal Reproducible Code

No response

Expected Results

To be able to pass disnake.Object to the category kwarg for any of the create_x_channel methods without pyright or pylance yelling at me.

Actual Results

Pylance and pyright yell about type mismatch.

Intents

not applicable

System Information

Disnake 2.9.1, and code is currently unchanged in master

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

@dlchamp dlchamp added the unconfirmed bug Something might not be working label Mar 2, 2024
@shiftinv shiftinv added bug Something isn't working t: refactor/typing/lint Refactors, typing changes and/or linting changes and removed unconfirmed bug Something might not be working labels Mar 2, 2024
@shiftinv shiftinv added this to the disnake v2.10 milestone Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working t: refactor/typing/lint Refactors, typing changes and/or linting changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants