fix(): add update mechanism for input cache#626
fix(): add update mechanism for input cache#626benflexcompute merged 5 commits intorelease-candidate/24.11from
Conversation
| ==== | ||
| """ | ||
|
|
||
| private_attribute_input_cache: GenericReferenceConditionCache = GenericReferenceConditionCache() |
There was a problem hiding this comment.
how does it impact type hints? I think IDE will list the options in order of definition, thus private_... and type_name should be last?
There was a problem hiding this comment.
You are right. input_cache will become the first in type hint.
There was a problem hiding this comment.
Reverted the ordering of private_attribute_input_cache to make type hint a bit cleaner.
| # private_attribute_input_cache has to be defined first for field validators to work. | ||
| private_attribute_input_cache: BoxCache = pd.Field(BoxCache(), frozen=True) |
There was a problem hiding this comment.
oh, interesting. Question how we can modify type hints..
There was a problem hiding this comment.
Never mind, I just tested and it seems that even though fields are validated by definition ordering but it is still accessible and has definition (None).
I thought it is like C++ where you reference an uninitialized pointer.
* fix(): add update mechanism for input cache * More unit tests * Fix unit test * Refactor to reduce number of validators * Reverted placement of private_attribute_input_cache
No description provided.