Showing 216 of 245 total issues
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, domain, host='localhost',
Function _fingerprint
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fingerprint(config=["test"], domain=["test"],
Function _create_tf_dial_embed
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _create_tf_dial_embed(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, text,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, domain, url, port, db, password, record_exp):
Function test_core
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_core(model: Text, stories: Text, endpoints: Text = None,
Avoid deeply nested control flow statements. Open
with warnings.catch_warnings():
warnings.simplefilter("ignore")
model = load_model(model_file)
Function as_story_string
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def as_story_string(self, e2e=False):
if self.intent:
if self.entities:
ent_string = json.dumps({ent['entity']: ent['value']
for ent in self.entities})
- 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 deeply nested control flow statements. Open
if s.type_name == 'list':
slot_events.append(SlotSet(s.name,
matching_entities))
else:
slot_events.append(SlotSet(s.name,
Avoid deeply nested control flow statements. Open
if online:
logger.info("Original stories are "
"different for {} -- {}\n"
"Memorized the new ones for "
"now. Delete contradicting "
Function collect_templates
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def collect_templates(
yml_templates: Dict[Text, List[Any]]
) -> Dict[Text, List[Dict[Text, Any]]]:
"""Go through the templates and make sure they are all in dict 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 test
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test(model: Text, stories: Text, nlu_data: Text, endpoints: Text = None,
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
text: Optional[Text],
output_channel: Optional['OutputChannel'] = None,
sender_id: Text = None,
parse_data: Dict[Text, Any] = 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 configure_app
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def configure_app(input_channels=None,
cors=None,
auth_token=None,
enable_api=True,
jwt_secret=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 deeply nested control flow statements. Open
if self.remove_duplicates:
hashed = self._hash_example(sliced_states,
event.action_name)
# only continue with tracker_states that created a
Avoid deeply nested control flow statements. Open
if delete_first_state:
raise Exception("Found two unpredictable "
"actions in one story."
"Check your story files.")
else:
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name,