RasaHQ/rasa_core

View on GitHub

Showing 216 of 245 total issues

Avoid too many return statements within this function.
Open

            return response.text('', 204)
Severity: Major
Found in rasa/core/server.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return response.json(parse_data)
    Severity: Major
    Found in rasa/core/server.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return ErrorResponse(400, "FailedIntentEvaluation",
      Severity: Major
      Found in rasa/core/server.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return response.text(domain_yaml,
        Severity: Major
        Found in rasa/core/server.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return ErrorResponse(400, "FailedIntentEvaluation",
          Severity: Major
          Found in rasa/core/server.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                    return response.text("success")
            Severity: Major
            Found in rasa/core/channels/telegram.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return await response.file(model_path)
              Severity: Major
              Found in rasa/core/server.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return response.json({
                Severity: Major
                Found in rasa/core/server.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return slack_webhook
                  Severity: Major
                  Found in rasa/core/channels/slack.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return response.text("")
                    Severity: Major
                    Found in rasa/core/channels/slack.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return response.json(responses)
                      Severity: Major
                      Found in rasa/core/server.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return response.json({
                        Severity: Major
                        Found in rasa/core/server.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return response.json(evaluation)
                          Severity: Major
                          Found in rasa/core/server.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return response.text("success")
                            Severity: Major
                            Found in rasa/core/channels/facebook.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return response.json(tracker.current_state(verbosity))
                              Severity: Major
                              Found in rasa/core/server.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return RasaNLUHttpInterpreter(name_parts[1],
                                Severity: Major
                                Found in rasa/core/interpreter.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return TrackerStore.load_tracker_from_module_string(domain, store)
                                  Severity: Major
                                  Found in rasa/core/tracker_store.py - About 30 mins to fix

                                    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:
                                    Severity: Minor
                                    Found in rasa/core/broker.py - About 25 mins to fix

                                    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__)
                                    
                                    
                                    Severity: Minor
                                    Found in rasa/core/channels/socketio.py - About 25 mins to fix

                                    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__)
                                    
                                    
                                    Severity: Minor
                                    Found in rasa/core/channels/channel.py - About 25 mins to fix

                                    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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language