Showing 303 of 336 total issues
Function list_hmcs
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def list_hmcs(self, name=None):
"""
Return a list of :class:`HMCDefinition` objects in the HMC inventory
file, for the specified HMC group or single HMC nickname.
- 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
File _storage_volume_template.py
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2019,2021 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Function get
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
# pylint: disable=unused-argument
"""Operation: List Adapters of a CPC (empty result if not in DPM
mode)."""
uri, query_parms = parse_query_parms(method, uri)
- 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
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
# pylint: disable=unused-argument
"""Operation: List Partitions of a CPC (empty result if not in DPM
mode)."""
uri, query_parms = parse_query_parms(method, uri)
- 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 post
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def post(method, hmc, uri, uri_parms, body, logon_required,
wait_for_completion):
# pylint: disable=unused-argument
"""Operation: Add Temporary Capacity."""
assert wait_for_completion is True # no async
- 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
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
# pylint: disable=unused-argument
"""Operation: List Virtual Switches of a CPC (empty result if not in
DPM mode)."""
uri, query_parms = parse_query_parms(method, uri)
- 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
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get(cls, method, hmc, uri, uri_parms, logon_required):
# pylint: disable=unused-argument
"""
Operation: List Image Activation Profiles.
In case of DPM mode, an empty list is returned.
- 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 scsi_load
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def scsi_load(self, load_address, wwpn, lun, load_parameter=None,
Function post
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def post(method, hmc, uri, uri_parms, body, logon_required,
wait_for_completion):
# pylint: disable=unused-argument
"""Operation: Modify Storage Group Properties."""
assert wait_for_completion is True # async not supported yet
- 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_properties_local
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get_properties_local(self, names, defaults=None):
"""
Return the values of a set of resource properties, using default values
for those that are not cached in this Python object, without
retrieving them from the HMC.
- 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 scsi_dump
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def scsi_dump(self, load_address, wwpn, lun, load_parameter=None,
Function post
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def post(method, hmc, uri, uri_parms, body, logon_required,
wait_for_completion):
# pylint: disable=unused-argument
"""Operation: Create NIC (requires DPM mode)."""
assert wait_for_completion is True # async not supported yet
- 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 post
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def post(method, hmc, uri, uri_parms, body, logon_required,
wait_for_completion):
# pylint: disable=unused-argument
"""Operation: Create Storage Group."""
assert wait_for_completion is True # async not supported yet
- 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 delete
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def delete(self, email_to_addresses=None, email_cc_addresses=None,
email_insert=None):
"""
Delete this storage volume on the HMC, and optionally send emails to
storage administrators requesting deletion of the storage volume on 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 check_for_completion
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def check_for_completion(self):
"""
Check once for completion of the job and return completion status and
result if it has completed.
- 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
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def get(self, uri, resource=None, logon_required=True, renew_session=True):
"""
Perform the HTTP GET method against the resource identified by a URI.
A set of standard HTTP headers is automatically part of the 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 __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, resource_class, class_name, session, parent, base_uri,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, nickname, description='', contact='', access_via='',
Function nvme_load
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def nvme_load(self, load_address, load_parameter=None, secure_boot=False,
Function post
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def post(method, hmc, uri, uri_parms, body, logon_required,
wait_for_completion):
# pylint: disable=unused-argument
"""Operation: Create User."""
assert wait_for_completion is True # synchronous operation