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

@commands.check and @error method typings/docs are not entirely accurate #1181

Open
shiftinv opened this issue Apr 2, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working t: documentation Improvements or additions to documentation/examples t: refactor/typing/lint Refactors, typing changes and/or linting changes

Comments

@shiftinv
Copy link
Member

shiftinv commented Apr 2, 2024

This is sort of a rehash of #614 (and #1045).
There are still a couple issues, mainly when used in cogs, many owing to the fact that overloads and generic callables don't really mix well :/

  1. @check/@error decorators in cogs trip up pyright already in fairly simple configurations
  2. The documented parameter/return types of checks are slightly off in many cases, especially bool vs Coro[bool]
  3. The usage of AnyContext in some decorator annotations is somewhat inconsistent
  4. Callable[[A | B], C] vs Callable[[A], C] | Callable[[B], C]
@shiftinv shiftinv added bug Something isn't working t: documentation Improvements or additions to documentation/examples t: refactor/typing/lint Refactors, typing changes and/or linting changes labels Apr 2, 2024
@shiftinv shiftinv self-assigned this Apr 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: documentation Improvements or additions to documentation/examples t: refactor/typing/lint Refactors, typing changes and/or linting changes
Projects
None yet
Development

No branches or pull requests

1 participant