The code has a lot of boilerplate, and I'd like to reduce it some by making helper functions and such
For example:
Every list generation from multiple fields is pretty much the exact same code
All the version checks could be a function call to something like minimum_accepted_version and maximum_accepted_version
A lot of request.args.get calls could be simplified (example below)
if request.args.get('excludedetails') and request.args.get('excludedetails') == 'true'
# 'false' could be replaces with just '', or not be there at all, but this is clearer to what's happening
if request.args.get('excludedetails', 'false') == 'true'
I'd be willing to do any or all of these changes, just not sure which ones are wanted, so any feedback would be nice.
The code has a lot of boilerplate, and I'd like to reduce it some by making helper functions and such
For example:
minimum_accepted_version
andmaximum_accepted_version
request.args.get
calls could be simplified (example below)I'd be willing to do any or all of these changes, just not sure which ones are wanted, so any feedback would be nice.