-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add mypy to core #14883
Add mypy to core #14883
Conversation
ya pants would be nice. With a past monorepo, I resorted to using multiple mypy invocations with different entry points. But that was for like 2-3 different packages lol. We have over 400 here... |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -701,6 +701,8 @@ def stream_chat( | |||
and chat_response.is_dummy_stream | |||
) | |||
e.on_end(payload={EventPayload.RESPONSE: chat_response}) | |||
|
|||
assert isinstance(chat_response, StreamingAgentChatResponse) |
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.
Why is there a need to check the type of chat_response again, when the earlier logic already allows dummy stream chat responses, making this seem redundant or conflicting?
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.
mypy was complaining that it wasn't the correct type
I see the issue though since it could technically return AgentChatResponse
Will need a pr to clean up that logic
For a while, mypy has not been running properly.
Ideally we could run it with pants, but that is currently blocked.
So for now, we can at least run on core and keep that up-to-date.
This PR ends up fixing 800+ mypy issues.
Here are some notes:
ignore
more than I wantedignore
)Sequence
vs.List
was very confusing to annotate. Fixed a few issues, but also usedignore
for someSimpleDirectoryReader.aload_file
was completely broken it seems like?