Showing 543 of 559 total issues
Function train_comparison_models
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def train_comparison_models(
story_file: Text,
domain: Text,
output_path: Text = "",
exclusion_percentages: Optional[List] = 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 _create_new_entity
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _create_new_entity(
tag_names: List[Text],
entity_tag: Text,
group_tag: Text,
role_tag: 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 _migrate_form_slots
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _migrate_form_slots(
domain: Dict[Text, Any]
) -> Tuple[Dict[Any, Dict[str, Any]], Optional[Any]]:
updated_slots = domain.get(KEY_SLOTS, {})
forms = domain.get(KEY_FORMS, {})
- 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 _should_extract_entities
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _should_extract_entities(
entity_tags: List[List[Dict[Text, List[Features]]]]
) -> bool:
for turns_tags in entity_tags:
for turn_tags in turns_tags:
- 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_analyzer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _check_analyzer(self) -> None:
if self.analyzer != "word":
if self.OOV_token is not None:
logger.warning(
"Analyzer is set to character, "
- 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 publish
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def publish(
self,
event: Dict[Text, Any],
retries: int = 60,
retry_delay_in_seconds: float = 5,
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
domain: Optional[Domain] = None,
dialect: Text = "sqlite",
host: 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
Avoid too many return
statements within this function. Open
return await result if isawaitable(result) else result
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 5
Avoid too many return
statements within this function. Open
return decorated
Avoid too many return
statements within this function. Open
return await result if isawaitable(result) else result
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return self._line_number_for_path(current, tail) or this_line
Avoid too many return
statements within this function. Open
return self.process_active_loop(event)
Avoid too many return
statements within this function. Open
return this_line
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return response.text("success")
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return fb_webhook