Skip to content

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented May 21, 2025

What does this PR do?

Pipeline type annotations with List type do not show up in expected type because the check for inspect.isclass(v.annotation) cannot handle nested annotated types such as List[float].

This results in a an error when running the following check for expected types:

and not expected_types[kw] == (inspect.Signature.empty,) # Skip if no type annotations

The expected key isn't present during the check.

This PR:

  • Updates _get_signature_types to account for List and Dict type annotations.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6 DN6 requested a review from yiyixuxu May 21, 2025 15:39
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@yiyixuxu yiyixuxu merged commit c36f848 into main May 21, 2025
33 checks passed
@yiyixuxu yiyixuxu deleted the type-annotation-fix branch May 21, 2025 21:50
@DN6 DN6 added the roadmap Add to current release roadmap label May 22, 2025
@DN6 DN6 moved this from In Progress to Done in Diffusers Roadmap 0.36 May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmap Add to current release roadmap

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants