zhmcclient/python-zhmcclient

View on GitHub

Showing 303 of 336 total issues

Function repr_dict has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

def repr_dict(dct, indent):
    """Return a debug representation of a dict or OrderedDict."""
    # pprint represents OrderedDict objects using the tuple init syntax,
    # which is not very readable. Therefore, dictionaries are iterated over.
    if dct is None:
Severity: Minor
Found in zhmcclient/_utils.py - About 45 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

Avoid deeply nested control flow statements.
Open

                        if mgr_obj.auto_update_enabled():
                            mgr_obj.auto_update_trigger_pull()
            elif action == 'remove':
Severity: Major
Found in zhmcclient/_auto_updater.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            for dc in domain_configs:
                                if dc['access-mode'] == 'control-usage':
                                    used_adapter_domains.append(dc['domain-index'])
                            used_domains.update(used_adapter_domains)
    Severity: Major
    Found in zhmcclient/_cpc.py - About 45 mins to fix

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

          def get(cls, method, hmc, uri, uri_parms, logon_required):
      Severity: Minor
      Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

        def check_set_noninput(method, uri, properties, prop_name, prop_value):
        Severity: Minor
        Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

              def get(cls, method, hmc, uri, uri_parms, logon_required):
          Severity: Minor
          Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                def get(cls, method, hmc, uri, uri_parms, logon_required):
            Severity: Minor
            Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                  def get(cls, method, hmc, uri, uri_parms, logon_required):
              Severity: Minor
              Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                    def get(cls, method, hmc, uri, uri_parms, logon_required):
                Severity: Minor
                Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                      def get(cls, method, hmc, uri, uri_parms, logon_required):
                  Severity: Minor
                  Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                    def check_partition_status(method, uri, partition, valid_statuses=None,
                    Severity: Minor
                    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                          def get(cls, method, hmc, uri, uri_parms, logon_required):
                      Severity: Minor
                      Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                            def get(cls, method, hmc, uri, uri_parms, logon_required):
                        Severity: Minor
                        Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                              def get(cls, method, hmc, uri, uri_parms, logon_required):
                          Severity: Minor
                          Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                                def get(cls, method, hmc, uri, uri_parms, logon_required):
                            Severity: Minor
                            Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                                  def get(cls, method, hmc, uri, uri_parms, logon_required):
                              Severity: Minor
                              Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                                    def get(cls, method, hmc, uri, uri_parms, logon_required):
                                Severity: Minor
                                Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                                      def get(cls, method, hmc, uri, uri_parms, logon_required):
                                  Severity: Minor
                                  Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                                        def get(cls, method, hmc, uri, uri_parms, logon_required):
                                    Severity: Minor
                                    Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix

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

                                          def get(cls, method, hmc, uri, uri_parms, logon_required):
                                      Severity: Minor
                                      Found in zhmcclient_mock/_urihandler.py - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language