-
Notifications
You must be signed in to change notification settings - Fork 20.1k
chore(langchain): fix some no-return-any mypy violations #34249
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
base: master
Are you sure you want to change the base?
Conversation
| result = func(state, runtime) | ||
| if isawaitable(result): | ||
| return await result | ||
| return result |
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.
we can't get there but mypy doesn't detect it
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.
For a case like this I'd rather type ignore (and same for the below), could we maybe just add a note?
9779c25 to
070388c
Compare
sydney-runkle
left a comment
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.
LGTM other than this, thanks!
| result = func(state, runtime) | ||
| if isawaitable(result): | ||
| return await result | ||
| return result |
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.
For a case like this I'd rather type ignore (and same for the below), could we maybe just add a note?
If we also have #32813 , then we can activate
no-return-anydetection in mypy.