Showing 34 of 34 total issues
Avoid too many return
statements within this function. Open
return jsonify(data=[result]), 200
Avoid too many return
statements within this function. Open
return error(status=400, detail=e.message)
Avoid too many return
statements within this function. Open
return error(status=404, detail='Table name not valid')
Avoid too many return
statements within this function. Open
return error(status=400, detail=e.message)
Avoid too many return
statements within this function. Open
return error(status=400, detail=e.message)
Avoid too many return
statements within this function. Open
return error(status=400, detail='No coordinates provided. Include geostore or lat & lon')
Avoid too many return
statements within this function. Open
return jsonify(data=query_results), 200
Avoid too many return
statements within this function. Open
return error(status=400, detail=e.message)
Avoid too many return
statements within this function. Open
return error(status=400, detail=e.message)
Avoid too many return
statements within this function. Open
return jsonify(data=output), 200
Function worker_int
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def worker_int(worker):
worker.log.info("worker received INT or QUIT signal")
## get traceback info
import threading, sys, traceback
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_bbox_by_hash
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_bbox_by_hash(func):
"""Get geodata"""
@wraps(func)
def wrapper(*args, **kwargs):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_latlon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_latlon(func):
"""Get geodata"""
@wraps(func)
def wrapper(*args, **kwargs):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_temporal_series
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_temporal_series(scenario, model, years, indicator, bbox):
logging.info('[QueryService] Getting temporal series from rasdaman')
year_min = sorted(years)[0].replace("'", '') if type(sorted(years)[0]) == 'string' else sorted(years)[0]
year_max = sorted(years)[-1].replace("'", '') if type(sorted(years)[-1]) == 'string' else sorted(years)[-1]
logging.info(year_min)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"