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

Feature/custom properties #32

Merged
merged 9 commits into from
Oct 20, 2023
Merged

Feature/custom properties #32

merged 9 commits into from
Oct 20, 2023

Conversation

p-snft
Copy link
Member

@p-snft p-snft commented Oct 19, 2023

The custom_properties is a dictionary that can be used to store information that can be used to easily attach custom information to any Entity.

This also simplifies the class Entity by quite a lot. There was a rather complicated construction of branches and loops so that Node only has a _label if there is a label set. Now, there is always a _label, but it is set to None by default, making the whole looping and branching unnecessary.

Implements #22

Always having the attribute _label but setting it to None if unset
makes things a lot simpler. Note that it is now obvious that kwargs
are silently ignored.
The custom_properties is a dictionary that can be used to
store information that can be used to easily attach custom
information to any Entity.
@p-snft p-snft added the enhancement New feature or request label Oct 19, 2023
@p-snft p-snft added this to the v1.0.0 milestone Oct 19, 2023
@pep8speaks
Copy link

pep8speaks commented Oct 19, 2023

Hello @p-snft! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2023-10-19 19:39:20 UTC

@p-snft p-snft marked this pull request as ready for review October 19, 2023 19:19
@p-snft p-snft requested a review from henhuy October 19, 2023 19:20
@p-snft p-snft linked an issue Oct 19, 2023 that may be closed by this pull request
@p-snft p-snft self-assigned this Oct 19, 2023
Copy link

@henhuy henhuy left a comment

Choose a reason for hiding this comment

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

Thanks for the implementation!

@p-snft p-snft merged commit aa66673 into dev Oct 20, 2023
@p-snft p-snft deleted the revision/custom_properties branch October 20, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement custom_attributes in Node/Entity
3 participants