RasaHQ/rasa_core

View on GitHub

Showing 216 of 245 total issues

Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, domain, host='localhost',
Severity: Major
Found in rasa/core/tracker_store.py - About 50 mins to fix

    Function _fingerprint has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def _fingerprint(config=["test"], domain=["test"],
    Severity: Major
    Found in tests/core/test_model.py - About 50 mins to fix

      Function _create_tf_dial_embed has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def _create_tf_dial_embed(
      Severity: Major
      Found in rasa/core/policies/embedding_policy.py - About 50 mins to fix

        Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self,
        Severity: Major
        Found in rasa/core/domain.py - About 50 mins to fix

          Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, text,
          Severity: Major
          Found in rasa/core/events/__init__.py - About 50 mins to fix

            Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Major
            Found in rasa/core/agent.py - About 50 mins to fix

              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self,
              Severity: Minor
              Found in rasa/core/policies/two_stage_fallback.py - About 45 mins to fix

                Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, domain, url, port, db, password, record_exp):
                Severity: Minor
                Found in tests/core/test_tracker_stores.py - About 45 mins to fix

                  Function test_core has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def test_core(model: Text, stories: Text, endpoints: Text = None,
                  Severity: Minor
                  Found in rasa/test.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            with warnings.catch_warnings():
                                                warnings.simplefilter("ignore")
                                                model = load_model(model_file)
                    
                    
                    Severity: Major
                    Found in rasa/core/policies/keras_policy.py - About 45 mins to fix

                      Function as_story_string has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def as_story_string(self, e2e=False):
                              if self.intent:
                                  if self.entities:
                                      ent_string = json.dumps({ent['entity']: ent['value']
                                                               for ent in self.entities})
                      Severity: Minor
                      Found in rasa/core/events/__init__.py - About 45 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

                      Avoid deeply nested control flow statements.
                      Open

                                              if s.type_name == 'list':
                                                  slot_events.append(SlotSet(s.name,
                                                                             matching_entities))
                                              else:
                                                  slot_events.append(SlotSet(s.name,
                      Severity: Major
                      Found in rasa/core/domain.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if online:
                                                    logger.info("Original stories are "
                                                                "different for {} -- {}\n"
                                                                "Memorized the new ones for "
                                                                "now. Delete contradicting "
                        Severity: Major
                        Found in rasa/core/policies/memoization.py - About 45 mins to fix

                          Function collect_templates has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def collect_templates(
                                  yml_templates: Dict[Text, List[Any]]
                              ) -> Dict[Text, List[Dict[Text, Any]]]:
                                  """Go through the templates and make sure they are all in dict format
                                  """
                          Severity: Minor
                          Found in rasa/core/domain.py - About 45 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 test has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def test(model: Text, stories: Text, nlu_data: Text, endpoints: Text = None,
                          Severity: Minor
                          Found in rasa/test.py - About 45 mins to fix

                            Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __init__(self,
                                             text: Optional[Text],
                                             output_channel: Optional['OutputChannel'] = None,
                                             sender_id: Text = None,
                                             parse_data: Dict[Text, Any] = None,
                            Severity: Minor
                            Found in rasa/core/channels/channel.py - About 45 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 configure_app has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def configure_app(input_channels=None,
                                              cors=None,
                                              auth_token=None,
                                              enable_api=True,
                                              jwt_secret=None,
                            Severity: Minor
                            Found in rasa/core/run.py - About 45 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

                            Avoid deeply nested control flow statements.
                            Open

                                                    if self.remove_duplicates:
                                                        hashed = self._hash_example(sliced_states,
                                                                                    event.action_name)
                            
                                                        # only continue with tracker_states that created a
                            Severity: Major
                            Found in rasa/core/featurizers.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if delete_first_state:
                                                          raise Exception("Found two unpredictable "
                                                                          "actions in one story."
                                                                          "Check your story files.")
                                                      else:
                              Severity: Major
                              Found in rasa/core/featurizers.py - About 45 mins to fix

                                Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def __init__(self, name,
                                Severity: Minor
                                Found in rasa/core/slots.py - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language