Skip to content

Conversation

@z-a-f
Copy link

@z-a-f z-a-f commented Dec 9, 2021

This allows a user to override the custom types. For example, one can do

binarytree._ATTR_VALUE_TYPES = (float, int, np.uint8) class CustomNode(binarytree.Node): pass 

Ideally, the attributes should be members of the nodes. That would allow a user to override a lot of different options, s.a. how the values are printed, what to do with the long strings, etc.

This allows a user to override the custom types. For example, one can do ``` binarytree._ATTR_VALUE_TYPES = (float, int, np.uint8) class CustomNode(binarytree.Node): pass ``` Ideally, the attributes should be members of the nodes. That would allow a user to override a lot of different options, s.a. how the values are printed, what to do with the long strings, etc.
@joowani
Copy link
Owner

joowani commented Jan 29, 2022

Sorry for the late reply @z-a-f and thank you for the contribution! lgtm

@joowani joowani merged commit f7478d7 into joowani:main Jan 29, 2022
@joowani
Copy link
Owner

joowani commented Jan 29, 2022

Actually this is failing both black and mypy so I'm going to have to revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants