Showing 543 of 559 total issues
Function train_nlu
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def train_nlu(
Function _loss_sigmoid
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _loss_sigmoid(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function load_data
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_data(
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);
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)
- 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 __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,
- 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 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.
- 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 _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.
- 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 _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
- 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 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)
- 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 _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()
- 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 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]]:
- 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 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
Function _train_graph
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _train_graph(
Function train_core
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def train_core(
Function _train_sim
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _train_sim(