Showing 216 of 245 total issues
Avoid too many return
statements within this function. Open
return response.text('', 204)
Avoid too many return
statements within this function. Open
return response.json(parse_data)
Avoid too many return
statements within this function. Open
return ErrorResponse(400, "FailedIntentEvaluation",
Avoid too many return
statements within this function. Open
return response.text(domain_yaml,
Avoid too many return
statements within this function. Open
return ErrorResponse(400, "FailedIntentEvaluation",
Avoid too many return
statements within this function. Open
return response.text("success")
Avoid too many return
statements within this function. Open
return await response.file(model_path)
Avoid too many return
statements within this function. Open
return response.json({
Avoid too many return
statements within this function. Open
return slack_webhook
Avoid too many return
statements within this function. Open
return response.text("")
Avoid too many return
statements within this function. Open
return response.json(responses)
Avoid too many return
statements within this function. Open
return response.json({
Avoid too many return
statements within this function. Open
return response.json(evaluation)
Avoid too many return
statements within this function. Open
return response.text("success")
Avoid too many return
statements within this function. Open
return response.json(tracker.current_state(verbosity))
Avoid too many return
statements within this function. Open
return RasaNLUHttpInterpreter(name_parts[1],
Avoid too many return
statements within this function. Open
return TrackerStore.load_tracker_from_module_string(domain, store)
Function from_endpoint_config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def from_endpoint_config(broker_config: Optional[EndpointConfig]
) -> Optional['EventChannel']:
"""Instantiate an event channel based on its configuration."""
if broker_config is None:
- 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 blueprint
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def blueprint(self, on_new_message):
sio = AsyncServer(async_mode='sanic')
socketio_webhook = SocketBlueprint(sio, self.socketio_path,
'socketio_webhook', __name__)
- 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 blueprint
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def blueprint(self, on_new_message):
custom_webhook = Blueprint(
'custom_webhook_{}'.format(type(self).__name__),
inspect.getmodule(self).__name__)
- 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"