-
Notifications
You must be signed in to change notification settings - Fork 139
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: check_any type error #1021
Conversation
4ba514d
to
613b347
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve actions also where applicable
@@ -14,7 +14,9 @@ | |||
CoroFunc = Callable[..., Coro[Any]] | |||
|
|||
Check = Union[ | |||
Callable[["Cog", "Context[Any]"], MaybeCoro[bool]], Callable[["Context[Any]"], MaybeCoro[bool]] | |||
Callable[["Cog"], Any], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not introduce ambiguity into types by making it so a check can take the cog as the first parameter and now can return anything it wishes to when items in checks should be callables that return a bool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i am also trying to type hint in bool but the check
inside check_any
method is returning a Cog
directly.
Thanks for the PR - I believe this is being superseded by #1048, which handles this more comprehensively |
Summary
Fixes this type error
Checklist
pdm lint
pdm pyright