Skip to content

Change model from_dict from staticmethod to classmethod #292

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

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

forest-benchling
Copy link
Collaborator

Fixes #215.

This allows from_dict to be inherited and overridden by subclasses. I couldn't think of any scenarios where this would be a breaking change, unless someone was relying on incorrect subclass inheritance.

The only relevant changes are in model.pyi. The rest of the files are from regenerating the e2e tests.

@forest-benchling forest-benchling marked this pull request as ready for review January 11, 2021 18:35
@bowenwr
Copy link
Contributor

bowenwr commented Jan 11, 2021

CC @dbanty

@emann
Copy link
Collaborator

emann commented Jan 11, 2021

LGTM assuming the checks pass - I or @dbanty need to fix the CI actions so that they run on PRs

@forest-benchling
Copy link
Collaborator Author

Hi @dbanty, should I add you as a reviewer? For some reason it looks like the Reviewers section is disabled for me, not sure if I'm missing something:

image

@dbanty
Copy link
Collaborator

dbanty commented Jan 12, 2021

@forest-benchling no need, I've got this on my list to review soon. Thanks for checking in though 🙂

Copy link
Collaborator

@dbanty dbanty left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@dbanty dbanty merged commit 701ea77 into openapi-generators:main Jan 12, 2021
@dbanty dbanty added this to the 0.8.0 milestone Jan 16, 2021
@eli-bl eli-bl deleted the benchling-issue-215 branch November 22, 2024 19:42
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.

Change <Model>.from_dict() to a @classmethod
4 participants