Showing 191 of 191 total issues
Function nic_update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def nic_update(cmd_ctx, cpc, partition, nic, **options):
Function cmd_nic_update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def cmd_nic_update(cmd_ctx, cpc_name, partition_name, nic_name, options):
Function find_vfunction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_vfunction(cmd_ctx, client, cpc_name, partition_name, vfunction_name):
Function find_hba
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_hba(cmd_ctx, client, cpc_name, partition_name, hba_name):
Function hba_update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def hba_update(cmd_ctx, cpc, partition, hba, **options):
Function metrics_nic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def metrics_nic(cmd_ctx, cpc, partition, nic, **options):
Function cmd_vfunction_update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def cmd_vfunction_update(cmd_ctx, cpc_name, partition_name, vfunction_name,
Function print_resources_as_json
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def print_resources_as_json(
Function vfunction_update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def vfunction_update(cmd_ctx, cpc, partition, vfunction, **options):
Function cmd_lpar_load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def cmd_lpar_load(cmd_ctx, cpc_name, lpar_name, load_address, options):
Function parse_ec_levels
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parse_ec_levels(cmd_ctx, option_name, ec_levels):
"""
Parse a list of EC levels specified in the command line as a list in
YAML Flow Collection style, where the list items are strings of the form
'EC.MCL' where EC is the EC number of the EC stream, and MCL is the MCL
- 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 cmd_cpc_upgrade
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_cpc_upgrade(cmd_ctx, cpc_name, options):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
cpc = find_cpc(cmd_ctx, client, cpc_name)
- 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 cmd_user_pattern_show
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_user_pattern_show(cmd_ctx, user_pattern_name):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
console = client.consoles.console
- 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 options_to_properties
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def options_to_properties(options, name_map=None):
"""
Convert click options into HMC resource properties.
The click option names in input parameters to this function are the
- 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 cmd_storagevolume_update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_storagevolume_update(cmd_ctx, stogrp_name, stovol_name, options):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
stovol = find_storagevolume(cmd_ctx, client, stogrp_name, stovol_name)
- 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 cmd_storagegroup_list
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_storagegroup_list(cmd_ctx, options):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
console = client.consoles.console
- 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 cmd_vstorageresource_update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_vstorageresource_update(cmd_ctx, stogrp_name, vsr_name, options):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
vsr = find_vstorageresource(cmd_ctx, client, stogrp_name, vsr_name)
- 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 cmd_storagegroup_update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_storagegroup_update(cmd_ctx, stogrp_name, options):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
stogrp = find_storagegroup(cmd_ctx, client, stogrp_name)
- 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 cmd_partition_remove_crypto
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cmd_partition_remove_crypto(
cmd_ctx, cpc_name, partition_name, options):
# pylint: disable=missing-function-docstring
client = zhmcclient.Client(cmd_ctx.session)
- 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 {'virtual-switch-uri': vswitch.uri}