Open pawl opened 7 years ago
To address this, you can refactor the AdminModelConverter.convert function by splitting it into smaller helper functions, each responsible for a specific sub-task or logical section. By doing so, you can reduce the complexity of the function and improve code readability
I tried running
flake8 --max-complexity 12 flask_admin
and these were the results:AdminModelConverter.convert
inflask_admin/contrib/sqla/form.py
really stands out with a complexity score of 29, so we definitely need to try to break it up into smaller functions.