rasa/core/policies/rule_policy.py

Summary

Maintainability
D
2 days
Test Coverage
A
99%

File rule_policy.py has 959 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import annotations
import copy
import functools
import logging
import structlog
Severity: Major
Found in rasa/core/policies/rule_policy.py - About 2 days to fix

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

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

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

          def _rule_prediction(
      Severity: Minor
      Found in rasa/core/policies/rule_policy.py - About 45 mins to fix

        Consider simplifying this complex logical expression.
        Open

                        if (
                            # value should be set, therefore
                            # check whether it is the same as in the state
                            value_from_rules
                            and value_from_rules != SHOULD_NOT_BE_SET
        Severity: Major
        Found in rasa/core/policies/rule_policy.py - About 40 mins to fix

          Function _check_prediction has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def _check_prediction(
          Severity: Minor
          Found in rasa/core/policies/rule_policy.py - About 35 mins to fix

            Function _collect_sources has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _collect_sources(
            Severity: Minor
            Found in rasa/core/policies/rule_policy.py - About 35 mins to fix

              Function predict_action_probabilities has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def predict_action_probabilities(
              Severity: Minor
              Found in rasa/core/policies/rule_policy.py - About 35 mins to fix

                There are no issues that match your filters.

                Category
                Status