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

Add from dict #216

Closed
wants to merge 2 commits into from
Closed

Add from dict #216

wants to merge 2 commits into from

Conversation

gaoyukid
Copy link
Contributor

In work, i usually need to deal with raw data in child:parent as a dict format - i need to rewrite from_dict function a lot to form a tree so i thought it could be a plugin

@gaoyukid gaoyukid requested a review from liamlundy as a code owner July 29, 2023 03:17
@gaoyukid
Copy link
Contributor Author

gaoyukid commented Aug 7, 2023

Ready for review

@caesar0301
Copy link
Owner

Ready for review

The plugin extension is deprecated and will be removed in near future. We recommend to enrich to_xxx and from from_xxx routines. In this case, a static method of from_dict would be appropriate.

remove fstring

migrate to Tree classmethod
@gaoyukid
Copy link
Contributor Author

gaoyukid commented Aug 7, 2023

Ready for review

The plugin extension is deprecated and will be removed in near future. We recommend to enrich to_xxx and from from_xxx routines. In this case, a static method of from_dict would be appropriate.

done - however, i'd like to point out that the from_dict schema is different than the to_dict schema, which can cause confusion

@caesar0301
Copy link
Owner

@gaoyukid Please help us to fix the flake8 linting.

@caesar0301
Copy link
Owner

Merged manually

@caesar0301 caesar0301 closed this Aug 18, 2023
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.

None yet

2 participants