Closed jackirvine97 closed 4 years ago
I would like to be able to format a string before checking if it is one of a set of options:
prop = processed_property( "prop_name", str_format="hyphen", options=OPTIONS_DISPATCHER.keys(), )
This would involve simply reordering conditionals in the processed property setter method so that the string formatting comes before option checking.
I am happy to implement, but first want to check this potential refactor is compatible with other pyproprop use cases?
pyproprop
See #40. We can likely combine.
Please see tests/unit/processed_property/test_option.py::test_setting_with_valid_options in PR #42.
tests/unit/processed_property/test_option.py::test_setting_with_valid_options
Addressed in c82e595c7762c73ae551819ba74f8f6af5d892c6.
I would like to be able to format a string before checking if it is one of a set of options:
This would involve simply reordering conditionals in the processed property setter method so that the string formatting comes before option checking.
I am happy to implement, but first want to check this potential refactor is compatible with other
pyproprop
use cases?