Closed patrickrwilson closed 3 years ago
@dreispt pre-commit is complaining that the method is too complex. I've simplified it but still doesn't like it. I'm not sure why, ideas?
product_configurator_restriction_policy/models/product_config.py:11:5: C901 'ProductConfigSession.values_available' is too complex (17)
The strategy I would use is to break parts of the big function into smaller helper functions.
Usually, when you feel the urge to add a code comment, that's often a code smell indication that you could extract the following code into its own function.
@bizzappdev @dreispt ready for your review. Thank you both for your help.
Code LGTM. some love to test cases will be really great.
Code LGTM. some love to test cases will be really great.
Yeah, we need to work on test cases for all of these, including the core ones which is coming later.
Ping @patrickrwilson
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 14.0-ocabot-merge-pr-41-by-dreispt-bump-nobump, awaiting test results.
Congratulations, your PR was merged at d311e2624ffbd8127a58f57cfe04e870ad17e932. Thanks a lot for contributing to OCA. ❤️
This adds an optional way to process the restrictions.