Orange-OpenSource/python-onapsdk

View on GitHub

Showing 1,318 of 1,318 total issues

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

    def _verify_action_to_sdc(self, desired_status: str, desired_action: str,
Severity: Minor
Found in src/onapsdk/sdc/service.py - About 35 mins to fix

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

        def _action_url(self,
    Severity: Minor
    Found in src/onapsdk/sdc/sdc_resource.py - About 35 mins to fix

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

          def add_deployment_artifact(self, artifact_type: str, artifact_label: str,
      Severity: Minor
      Found in src/onapsdk/sdc/sdc_resource.py - About 35 mins to fix

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

            def create(cls, rb_name: str,
        Severity: Minor
        Found in src/onapsdk/msb/k8s/definition.py - About 35 mins to fix

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

              def create(cls,
          Severity: Minor
          Found in src/onapsdk/aai/business/customer.py - About 35 mins to fix

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

                def get_all(cls,
            Severity: Minor
            Found in src/onapsdk/aai/cloud_infrastructure/complex.py - About 35 mins to fix

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

                  def __init__(self, rb_name: str,
              Severity: Minor
              Found in src/onapsdk/msb/k8s/definition.py - About 35 mins to fix

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

                    def __init__(self, instance_id: str,
                Severity: Minor
                Found in src/onapsdk/msb/k8s/instance.py - About 35 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return const.UNDER_CERTIFICATION
                  Severity: Major
                  Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return sdc_status
                    Severity: Major
                    Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return const.SUBMITTED
                      Severity: Major
                      Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return None
                        Severity: Major
                        Found in src/onapsdk/sdc/sdc_resource.py - About 30 mins to fix

                          Function pnf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def pnf(self) -> "Pnf":
                                  """Pnf associated with that pnf instance.
                          
                                  Raises:
                                      ResourceNotFound: Could not find PNF for that PNF instance
                          Severity: Minor
                          Found in src/onapsdk/aai/business/pnf.py - About 25 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 vnf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def vnf(self) -> "Vnf":
                                  """Vnf associated with that vnf instance.
                          
                                  Raises:
                                      ResourceNotFound: Could not find VNF for that VNF instance
                          Severity: Minor
                          Found in src/onapsdk/aai/business/vnf.py - About 25 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 vf_module has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def vf_module(self) -> "VfModule":
                                  """Vf module associated with that vf module instance.
                          
                                  Returns:
                                      VfModule: VfModule object associated with vf module instance
                          Severity: Minor
                          Found in src/onapsdk/aai/business/vf_module.py - About 25 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_vf_list_from_tosca_file has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def get_vf_list_from_tosca_file(model: str) -> List:
                              """Get the list of Vfs of a VNF based on the tosca file.
                          
                              Args:
                                  model (str): the model retrieved from the tosca file at Vnf
                          Severity: Minor
                          Found in src/onapsdk/utils/tosca_file_handler.py - About 25 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

                          Line too long (90 > 79 characters)
                          Open

                                                         self.name, self.version_filter) # pylint: disable=no-member
                          Severity: Minor
                          Found in src/onapsdk/sdc/__init__.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          At least two spaces before inline comment
                          Open

                                          lambda obj: obj.version == self.version_filter, relevant_objects) # pylint: disable=no-member
                          Severity: Minor
                          Found in src/onapsdk/sdc/__init__.py by pep8

                          Separate inline comments by at least two spaces.

                          An inline comment is a comment on the same line as a statement.
                          Inline comments should be separated by at least two spaces from the
                          statement. They should start with a # and a single space.
                          
                          Each line of a block comment starts with a # and a single space
                          (unless it is indented text inside the comment).
                          
                          Okay: x = x + 1  # Increment x
                          Okay: x = x + 1    # Increment x
                          Okay: # Block comment
                          E261: x = x + 1 # Increment x
                          E262: x = x + 1  #Increment x
                          E262: x = x + 1  #  Increment x
                          E265: #Block comment
                          E266: ### Block comment

                          Line too long (82 > 79 characters)
                          Open

                                      versioned_object = max(relevant_objects, key=self._get_mapped_version)
                          Severity: Minor
                          Found in src/onapsdk/sdc/__init__.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (94 > 79 characters)
                          Open

                                  Abstract method which should be implemented by subclasses and creates resource in SDC.
                          Severity: Minor
                          Found in src/onapsdk/sdc/sdc_resource.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.
                          Severity
                          Category
                          Status
                          Source
                          Language