zhmcclient/python-zhmcclient

View on GitHub

Showing 303 of 336 total issues

Function deactivate has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def deactivate(self, wait_for_completion=True,
Severity: Minor
Found in zhmcclient/_lpar.py - About 35 mins to fix

    Function get has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Storage Volumes of a Storage Group."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List User Patterns."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: Get <resource> Properties."""
            # All URI patterns for Get Properties operations must have a last
            # match group for the query parms.
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Password Rules."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Users."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Capacity Groups (always global but with filters)."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, manager, properties):
            super(FakedPartition, self).__init__(
                manager=manager,
                properties=properties)
            if 'hba-uris' not in self._properties:
    Severity: Minor
    Found in zhmcclient_mock/_hmc.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Unmanaged CPCs."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List LDAP Server Definitions."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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_partition_status has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def check_partition_status(method, uri, partition, valid_statuses=None,
                               invalid_statuses=None):
        """
        Check that the partition is in one of the valid statuses (if specified)
        and not in one of the invalid statuses (if specified), as indicated by its
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List User Roles."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Tasks."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get(cls, method, hmc, uri, uri_parms, logon_required):
            # pylint: disable=unused-argument
            """Operation: List Custom Groups."""
            uri, query_parms = parse_query_parms(method, uri)
            check_invalid_query_parms(
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 dump has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def dump(self):
            """
            Dump this Console resource with its properties and child resources
            (recursively) as a resource definition.
    
    
    Severity: Minor
    Found in zhmcclient/_console.py - About 35 mins to fix

    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 extractAdapters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def extractAdapters(cpc_uri, inventory_list):
        """
        Extract all items from inventory_list with class "adapter" and parent
        cpc_uri.
        """
    Severity: Minor
    Found in zhmcclient/_cpc.py - About 35 mins to fix

    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 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def post(method, hmc, uri, uri_parms, body, logon_required,
                 wait_for_completion):
            # pylint: disable=unused-argument
            """Operation: NVME Dump (requires classic mode)."""
            assert wait_for_completion is True  # async not supported yet
    Severity: Minor
    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

    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 divide_filter_args has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def divide_filter_args(query_props, filter_args):
        """
        Divide the filter arguments into filter query parameters for filtering
        on the server side, and the remaining client-side filters.
    
    
    Severity: Minor
    Found in zhmcclient/_utils.py - About 35 mins to fix

    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 remove_temporary_capacity has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def remove_temporary_capacity(
                self, record_id, software_model=None, processor_info=None):
            """
            Remove temporary processors from the CPC or decrease temporary model
            capacity of the CPC.
    Severity: Minor
    Found in zhmcclient/_cpc.py - About 35 mins to fix

    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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, manager, uri, name, properties):
            # This method intentionally has no docstring, because it is internal.
            #
            # Parameters:
            #   manager (subclass of :class:`~zhmcclient.BaseManager`):
    Severity: Minor
    Found in zhmcclient/_resource.py - About 35 mins to fix

    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

    Severity
    Category
    Status
    Source
    Language