Showing 543 of 559 total issues
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _validate_number_of_dimensions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _validate_number_of_dimensions(
number_of_dimensions: int, input_array: np.ndarray
) -> None:
"""Validates if the the input array has given number of dimensions.
- 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 _fingerprint_node
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _fingerprint_node(
graph: "networkx.MultiDiGraph", node: int, max_history: int
) -> Set[Text]:
"""Fingerprint a node in a graph.
- 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 applied_events
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def applied_events(self) -> List[Event]:
"""Returns all actions that should be applied - w/o reverted events.
Returns:
The events applied to the tracker.
- 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 update
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def update(
self,
event: Event,
domain: Optional[Domain] = None,
) -> 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 add_events
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def add_events(self, events: List[Event]) -> None:
"""Adds next story steps with the specified list of events.
Args:
events: Events that need to be added.
- 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 _parse_nlu
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _parse_nlu(self, nlu_data: Optional[List[Dict[Text, Any]]]) -> None:
if not nlu_data:
return
- 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 _find_data_files_in_directory
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _find_data_files_in_directory(
directory: Text, filter_property: Callable[[Text], bool]
) -> Set[Text]:
filtered_files = set()
- 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 generate_message
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def generate_message(message: Dict[Text, Any]) -> Text:
"""Generates text for a message object.
Args:
message: A message
- 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 topological_sort
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def topological_sort(
graph: Dict[Text, Set[Text]]
) -> Tuple[deque, List[Tuple[Text, Text]]]:
"""Creates a top sort of a directed graph. This is an unstable sorting!
- 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 _extract_message
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _extract_message(self, req: Request) -> Text:
if req.json["type"] == "MESSAGE":
message = req.json["message"]["text"]
- 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 _pick_best_policy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _pick_best_policy(predictions: List[PolicyPrediction]) -> PolicyPrediction:
"""Picks the best policy prediction based on probabilities and policy priority.
Args:
predictions: a list containing policy predictions
- 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 serialise
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def serialise(self) -> Tuple[PredictionList, PredictionList]:
"""Turn targets and predictions to lists of equal size for sklearn."""
texts = sorted(
set(
[str(e.get("text", "")) for e in self.entity_targets]
- 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 _add_nlu_predict_node_from_train
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_nlu_predict_node_from_train(
Function _loss_margin
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _loss_margin(
Function _add_nlu_train_node
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_nlu_train_node(
Function plot_confusion_matrix
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_confusion_matrix(
Function create_data_generators
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_data_generators(
Function call
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def call(
Function _loss_cross_entropy
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _loss_cross_entropy(