Showing 82 of 99 total issues
Function _configure_requirements
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _configure_requirements(self,
Function notify
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def notify(self, verbose: bool, workdir: str, trigger_name_or_event: Optional[str],
Function notify
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def notify(self, verbose: bool, workdir: str, trigger_name_or_event: Optional[str],
Function validate_csar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def validate_csar(csar_path: PurePath, inputs: typing.Optional[dict], storage: Storage, verbose: bool,
Function submit_operation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def submit_operation(self, operation, node_id, verbose, workdir, *args):
Function validate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, verbose, workdir, num_workers=None):
# Currently, we are running a really stupid O(n^3) algorithm, but unless we get to the templates with
# millions of node instances, we should be fine.
with NodeExecutor(num_workers) as executor:
do_validate = True
- 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 undeploy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def undeploy(self, verbose, workdir, num_workers=None):
# Currently, we are running a really stupid O(n^3) algorithm, but unless we get to the templates with
# millions of node instances, we should be fine.
with NodeExecutor(num_workers) as executor:
do_undeploy = True
- 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_template
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_template(storage, workdir):
if storage.exists("inputs"):
inputs = storage.read_json("inputs")
else:
inputs = {}
- 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 deploy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def deploy(self, verbose, workdir, num_workers=None):
# Currently, we are running a really stupid O(n^3) algorithm, but unless we get to the templates with
# millions of node instances, we should be fine.
with NodeExecutor(num_workers) as executor:
do_deploy = True
- 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 rel.attributes[attr].eval(self, attr)
Avoid too many return
statements within this function. Open
return "error"
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 0
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 1
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 1