The same_function_helper.py file contains multiple functions that are reused all over the API.
CodeClimate has found the following issue:
Similar blocks of code found in 3 locations. Consider refactoring.
def getQhawaxMode(qhawax_name):
""" Get qHAWAX mode based on name """
if(qhawaxExistBasedOnName(qhawax_name)):
return session.query(Qhawax.mode).filter_by(name=qhawax_name).first()[0]
return None
def getQhawaxName(qhawax_id):
""" Helper function to get qHAWAX name base on qHAWAX ID """
if(qhawaxExistBasedOnID(qhawax_id)):
return session.query(Qhawax.name).filter_by(id =qhawax_id).first()[0]
return None
def getMainIncaQhawaxTable(qhawax_name):
""" Helper function to get qHAWAX Main Inca based on qHAWAX name """
if(qhawaxExistBasedOnName(qhawax_name)):
return session.query(Qhawax.main_inca).filter_by(name=qhawax_name).first()[0]
return None
The same_function_helper.py file contains multiple functions that are reused all over the API.
CodeClimate has found the following issue:
Similar blocks of code found in 3 locations. Consider refactoring.