Skip to content
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

fix error when building a Generic type #522

Merged
2 commits merged into from Dec 14, 2023
Merged

fix error when building a Generic type #522

2 commits merged into from Dec 14, 2023

Conversation

ppwwyyxx
Copy link
Contributor

@ppwwyyxx ppwwyyxx commented Dec 3, 2023

fix #515

The added unittest would fail before this PR and now pass. The check if isinstance(fn_or_cls, type) and issubclass(fn_or_cls, Generic) is kept as a workaround for python3.8.

The failure before this PR is:

>       return buildable.__build__(*args, **kwargs)
E       TypeError: Config.__build__() got multiple values for argument 'self'
E
E       Fiddle context: failed to construct or call GenericClass at <root> with positional arguments: (), keyword arguments: (self=1).

@ppwwyyxx
Copy link
Contributor Author

ppwwyyxx commented Dec 8, 2023

@dhr would you mind taking a look? Thanks!

@copybara-service copybara-service bot closed this pull request by merging all changes into google:main in 86493ee Dec 14, 2023
@dhr
Copy link
Collaborator

dhr commented Dec 14, 2023

Thanks for the fix! Sorry for the slow turnaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect signature parsing for subclass of Generic
2 participants