Showing 543 of 559 total issues

Function train_nlu has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def train_nlu(
Severity: Major
Found in rasa/model_training.py - About 1 hr to fix

    Function _loss_sigmoid has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def _loss_sigmoid(
    Severity: Major
    Found in rasa/utils/tensorflow/layers.py - About 1 hr to fix

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

          def __init__(
      Severity: Major
      Found in rasa/utils/tensorflow/transformer.py - About 1 hr to fix

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

            def __init__(
        Severity: Major
        Found in rasa/core/channels/slack.py - About 1 hr to fix

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

              def __init__(
          Severity: Major
          Found in rasa/core/policies/unexpected_intent_policy.py - About 1 hr to fix

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

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

              Function load_data has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def load_data(
              Severity: Major
              Found in rasa/core/training/__init__.py - About 1 hr to fix

                Function getIncludedSources has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                async function getIncludedSources(options) {
                
                    options = { ...defaultOptions, ...options };
                    const { docsDir, include, relativeSourceDir, pathPrefix } = options;
                    const cleanedSourceDir = path.join(docsDir.replace('./', ''), relativeSourceDir);
                Severity: Minor
                Found in docs/plugins/included_source.js - About 1 hr to fix

                  Function get_model_name_and_weights_from_config has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def get_model_name_and_weights_from_config(
                      config_path: str,
                  ) -> List[LmfSpec]:
                      config = rasa.shared.utils.io.read_config_file(config_path)
                      logger.info(config)
                  Severity: Minor
                  Found in .github/scripts/download_pretrained.py - About 1 hr 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 __init__ has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def __init__(
                          self,
                          num_classes: TensorLike,
                          average: Optional[str] = None,
                          beta: TensorLike = 1.0,
                  Severity: Minor
                  Found in rasa/utils/tensorflow/metrics.py - About 1 hr 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 combine_result has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def combine_result(
                      result1: Dict[str, dict], result2: Dict[str, Dict[str, Dict]]
                  ) -> Dict[str, Dict[str, List]]:
                      """Combines 2 result dicts to accumulated dict of the same format.
                  
                  
                  Severity: Minor
                  Found in .github/scripts/mr_generate_summary.py - About 1 hr 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 _check_if_sparse_feature_sizes_decreased has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _check_if_sparse_feature_sizes_decreased(
                          new_sparse_feature_sizes: Dict[Text, Dict[Text, List[int]]],
                          old_sparse_feature_sizes: Dict[Text, Dict[Text, List[int]]],
                      ) -> None:
                          """Checks if the sizes of sparse features have decreased during fine-tuning.
                  Severity: Minor
                  Found in rasa/utils/tensorflow/models.py - About 1 hr 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 _first_loop_execution_or_unhappy_path has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _first_loop_execution_or_unhappy_path(
                          self, loop_action_name: Text, applied_events: List[Event]
                      ) -> bool:
                          next_action: Optional[Text] = None
                  
                  
                  Severity: Minor
                  Found in rasa/shared/core/trackers.py - About 1 hr 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 process has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def process(self, messages: List[Message]) -> List[Message]:
                          """Return the most likely intent and its probability for a message."""
                          for message in messages:
                              if self.clf is None or not message.features_present(
                                  attribute=TEXT, featurizers=self.component_config.get(FEATURIZERS)
                  Severity: Minor
                  Found in rasa/nlu/classifiers/sklearn_intent_classifier.py - About 1 hr 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 _validate_configuration has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _validate_configuration(self) -> None:
                          """Checks that the user configurations are valid."""
                          if self.assistant_voice not in self.SUPPORTED_VOICES:
                              self._raise_invalid_voice_exception()
                  
                  
                  Severity: Minor
                  Found in rasa/core/channels/twilio_voice.py - About 1 hr 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 encode_state has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def encode_state(
                          self,
                          state: State,
                          precomputations: Optional[MessageContainerForCoreFeaturization],
                      ) -> Dict[Text, List[Features]]:
                  Severity: Minor
                  Found in rasa/core/featurizers/single_state_featurizer.py - About 1 hr 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 getProgramOutputs has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  async function getProgramOutputs(options) {
                  
                      options = { ...defaultOptions, ...options };
                      const { docsDir, include, mainSourceDir, commandPrefix } = options;
                      // first, gather all the docs files
                  Severity: Minor
                  Found in docs/plugins/program_output.js - About 1 hr to fix

                    Function _train_graph has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _train_graph(
                    Severity: Major
                    Found in rasa/model_training.py - About 1 hr to fix

                      Function train_core has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def train_core(
                      Severity: Major
                      Found in rasa/model_training.py - About 1 hr to fix

                        Function _train_sim has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def _train_sim(
                        Severity: Major
                        Found in rasa/utils/tensorflow/layers.py - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language