Showing 82 of 99 total issues
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return rel.template.properties[prop].eval(self, prop)
Avoid too many return
statements within this function. Open
return "unknown"
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return prompt_yes_no_question(yes_responses, no_responses, case_sensitive, default_yes_response)
Function _parser_callback
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _parser_callback(args):
try:
inputs = yaml.safe_load(args.inputs) if args.inputs else {}
except yaml.YAMLError as e:
print(f"Invalid inputs: {e}")
- 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_node_or_relationship
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_node_or_relationship(self, entity_name):
node = self.find_node(entity_name)
relationship = self.find_relationship(entity_name)
if not node and not relationship:
- 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 _parser_callback
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _parser_callback(args):
if args.instance_path and not path.isdir(args.instance_path):
raise argparse.ArgumentTypeError(f"Directory {args.instance_path} is not a valid path!")
storage = Storage.create(args.instance_path)
- 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 run_operation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run_operation(self,
host: OperationHost,
interface: str,
operation_type: Union[StandardInterfaceOperation, ConfigureInterfaceOperation],
verbose: bool,
- 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 prepare_update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def prepare_update(self, topology_template1, topology_template2, template_diff):
# no need to take relationships into account
# as they are always in "initial" state
nodes_diff = template_diff.changed.get("nodes", Diff())
for node1 in topology_template1.nodes.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"