Showing 243 of 245 total issues
Function load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load(cls,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, correct_action, predicted_action,
Function _add_message_edge
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_message_edge(graph: 'networkx.MultiDiGraph',
Function deserialise_events
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def deserialise_events(serialized_events: List[Dict[Text, Any]]
) -> List['Event']:
"""Convert a list of dictionaries to a list of corresponding events.
Example 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 as_feature
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def as_feature(self):
r = [0.0] * self.feature_dimensionality()
try:
for i, v in enumerate(self.values):
- 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_attn_cell
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _create_attn_cell(self,
cell: tf.contrib.rnn.RNNCell,
embed_utter: tf.Tensor,
embed_prev_action: tf.Tensor,
real_length: tf.Tensor,
- 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 blueprint
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def blueprint(self, on_new_message):
twilio_webhook = Blueprint('twilio_webhook', __name__)
@twilio_webhook.route("/", methods=['GET'])
async def health(request):
- 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 get_validated_path
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_validated_path(current: Optional[Text], parameter: Text,
default: Optional[Text] = None,
none_is_valid: bool = False) -> Optional[Text]:
"""Check whether a file path or its default value is valid and returns it.
- 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 blueprint
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def blueprint(self, on_new_message):
slack_webhook = Blueprint('slack_webhook', __name__)
@slack_webhook.route("/", methods=['GET'])
async def health(request):
- 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 _length_of_common_action_prefix
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _length_of_common_action_prefix(this: List[Event],
other: List[Event]) -> int:
"""Calculate number of actions that two conversations have in common."""
num_common_actions = 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 _remove_unused_generated_cps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _remove_unused_generated_cps(
self,
story_steps: Dict[Text, StoryStep],
overlapping_cps: Set[Text],
story_end_checkpoints: Dict[Text, 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
Avoid too many return
statements within this function. Open
return response.json(responses)
Avoid too many return
statements within this function. Open
return response.json(domain)
Avoid too many return
statements within this function. Open
return response.text("success")
Avoid too many return
statements within this function. Open
return load_event_channel_from_module_string(broker_config)
Avoid too many return
statements within this function. Open
return telegram_webhook
Avoid too many return
statements within this function. Open
return response.json(tracker.current_state(verbosity))
Avoid too many return
statements within this function. Open
return response.json(keys)
Avoid too many return
statements within this function. Open
return fb_webhook
Avoid too many return
statements within this function. Open
return response.text(state)