-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Declare exports in __all__ for type checking #10238
Conversation
Thanks @dustalov! I think this should be good, let me cc @aliabid94 @freddyaboulton for review |
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/cf2d0f68f8fc100f945d710c8dff949f75f4ce56/gradio-5.9.1-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@cf2d0f68f8fc100f945d710c8dff949f75f4ce56#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/cf2d0f68f8fc100f945d710c8dff949f75f4ce56/gradio-client-1.8.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/cf2d0f68f8fc100f945d710c8dff949f75f4ce56/dist/lite.js""></script> |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
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.
Thanks @dustalov ! Confirmed this fixes the issue on a fresh install
Thanks again @dustalov! I fixed some other typing issues and merged |
* Declare exports * add changeset * type fixes * more type fixes * add changeset * notebooks * changes --------- Co-authored-by: gradio-pr-bot <[email protected]> Co-authored-by: Freddy Boulton <[email protected]> Co-authored-by: Abubakar Abid <[email protected]>
Description
When a project using Gradio enforces strict type checking, it results in errors due to missing symbols in Gradio's
__all__
list: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport.This pull request fixes the issue by explicitly exporting the necessary symbols in
__init__.py
.Closes: dustalov/evalica#25 (it impacted my personal project and the fix worked well for me)