Skip to content

Conversation

@abidlabs
Copy link
Member

@abidlabs abidlabs commented Dec 17, 2025

ty is now in beta, so a good time for us to upgrade from the alpha release we were using previously. Around 300 additional typing errors were caught so I've fixed some of them and asked AI to type:ignore the rest so that we can fix at our leisure.

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 17, 2025

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/5602fb05e053b39bc898279486910f53a1ebc904/gradio-6.1.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@5602fb05e053b39bc898279486910f53a1ebc904#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/5602fb05e053b39bc898279486910f53a1ebc904/gradio-client-2.0.0.tgz

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 17, 2025

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio patch

  • Upgrade ty to 0.0.2

✅ Changeset approved by @abidlabs

  • Maintainers can remove approval by unchecking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@abidlabs abidlabs marked this pull request as ready for review December 17, 2025 21:05
@abidlabs abidlabs added the v: patch A change that requires a patch release label Dec 17, 2025
Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we disable typing on the tests? If there was a mistake, it would be caught when we run the tests.

But looks good. Not looking forward to fixing these errors later 😓

@aliabid94
Copy link
Collaborator

Hmm is it worth it to add all these type:ignore lines to our demos, which are often used in our docs? Or do we already filter out the type:ignore comments in our docs? Would be nice if we did

@abidlabs
Copy link
Member Author

What if we disable typing on the tests? If there was a mistake, it would be caught when we run the tests.

The reason it's important to type the tests and demos is because they are the most representative of type errors that users are likely to use when integrating Gradio into their own code bases, so we should include them. e.g. one of our public classes might be typed as list[Component] instead of Sequence[Component] and downstream users will encounter an error if they pass in a list[subclass of Component].

Hmm is it worth it to add all these type:ignore lines to our demos, which are often used in our docs? Or do we already filter out the type:ignore comments in our docs? Would be nice if we did

Good idea, I'll filter them out from the demos

@abidlabs
Copy link
Member Author

Oh looks like we already do:

.replace("# type: ignore", "")

So this PR should be good for review/merge whenever

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @abidlabs !

@abidlabs
Copy link
Member Author

Thanks @freddyaboulton!

@abidlabs abidlabs merged commit fac3844 into main Dec 18, 2025
21 checks passed
@abidlabs abidlabs deleted the ty branch December 18, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v: patch A change that requires a patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants