Skip to content

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

Open
@shiftinv

Description

@shiftinv

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]

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingt: documentationImprovements or additions to documentation/examplest: refactor/typing/lintRefactors, typing changes and/or linting changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions