Orange-OpenSource/python-onapsdk

View on GitHub
src/onapsdk/sdc/service.py

Summary

Maintainability
D
2 days
Test Coverage
A
96%

File service.py has 740 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
"""Service module."""
import base64
Severity: Major
Found in src/onapsdk/sdc/service.py - About 1 day to fix

    Cyclomatic complexity is too high in method create_node_template. (11)
    Open

        def create_node_template(self,
                                 node_template_type: Type[NodeTemplate],
                                 component: "Component") -> NodeTemplate:
            """Create a node template type object.
    
    
    Severity: Minor
    Found in src/onapsdk/sdc/service.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method _unzip_csar_file. (7)
    Open

        @staticmethod
        def _unzip_csar_file(zip_file: Union[str, BytesIO],
                             function: Callable[[str,
                                                 TextIOWrapper], None]) -> None:
            """
    Severity: Minor
    Found in src/onapsdk/sdc/service.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method onboard. (7)
    Open

        def onboard(self) -> None:
            """Onboard the Service in SDC.
    
            Raises:
                StatusError: service has an invalid status
    Severity: Minor
    Found in src/onapsdk/sdc/service.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method _check_distributed. (6)
    Open

        def _check_distributed(self) -> bool:
            """Check if service is distributed and update status accordingly."""
            url = "{}/services/distribution/{}".format(self._base_create_url(),
                                                       self.distribution_id)
            headers = headers_sdc_creator(SdcResource.headers)
    Severity: Minor
    Found in src/onapsdk/sdc/service.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

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

        def __init__(self, name: str = None, version: str = None, sdc_values: Dict[str, str] = None,  # pylint: disable=too-many-arguments
    Severity: Major
    Found in src/onapsdk/sdc/service.py - About 1 hr to fix

      Function create_node_template has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def create_node_template(self,
                                   node_template_type: Type[NodeTemplate],
                                   component: "Component") -> NodeTemplate:
              """Create a node template type object.
      
      
      Severity: Minor
      Found in src/onapsdk/sdc/service.py - About 1 hr 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 onboard has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def onboard(self) -> None:
              """Onboard the Service in SDC.
      
              Raises:
                  StatusError: service has an invalid status
      Severity: Minor
      Found in src/onapsdk/sdc/service.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

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

          def add_artifact_to_vf(self, vnf_name: str, artifact_type: str,
      Severity: Minor
      Found in src/onapsdk/sdc/service.py - About 35 mins to fix

        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

          Continuation line unaligned for hanging indent
          Open

                                                      property_def["value"] == "base_template_dummy_ignore"
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Continuation lines indentation.

          Continuation lines should align wrapped elements either vertically
          using Python's implicit line joining inside parentheses, brackets
          and braces, or using a hanging indent.
          
          When using a hanging indent these considerations should be applied:
          - there should be no arguments on the first line, and
          - further indentation should be used to clearly distinguish itself
            as a continuation line.
          
          Okay: a = (\n)
          E123: a = (\n    )
          
          Okay: a = (\n    42)
          E121: a = (\n   42)
          E122: a = (\n42)
          E123: a = (\n    42\n    )
          E124: a = (24,\n     42\n)
          E125: if (\n    b):\n    pass
          E126: a = (\n        42)
          E127: a = (24,\n      42)
          E128: a = (24,\n    42)
          E129: if (a or\n    b):\n    pass
          E131: a = (\n    42\n 24)

          Line too long (82 > 79 characters)
          Open

                          f"{self.unique_identifier}/filteredDataByParams?include=metadata")
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (89 > 79 characters)
          Open

                      msg = f"No distributions found for {self.name} of {self.__class__.__name__}."
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (87 > 79 characters)
          Open

                                      property_def["value"] == "base_template_dummy_ignore" for \
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          The backslash is redundant between brackets
          Open

                              if not any([property_def["name"] == "vf_module_label"] and \
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Avoid explicit line join between brackets.

          The preferred way of wrapping long lines is by using Python's
          implied line continuation inside parentheses, brackets and braces.
          Long lines can be broken over multiple lines by wrapping expressions
          in parentheses.  These should be used in preference to using a
          backslash for line continuation.
          
          E502: aaa = [123, \\n       123]
          E502: aaa = ("bbb " \\n       "ccc")
          
          Okay: aaa = [123,\n       123]
          Okay: aaa = ("bbb "\n       "ccc")
          Okay: aaa = "bbb " \\n    "ccc"
          Okay: aaa = 123  # \\

          The backslash is redundant between brackets
          Open

                                      property_def["value"] == "base_template_dummy_ignore" for \
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Avoid explicit line join between brackets.

          The preferred way of wrapping long lines is by using Python's
          implied line continuation inside parentheses, brackets and braces.
          Long lines can be broken over multiple lines by wrapping expressions
          in parentheses.  These should be used in preference to using a
          backslash for line continuation.
          
          E502: aaa = [123, \\n       123]
          E502: aaa = ("bbb " \\n       "ccc")
          
          Okay: aaa = [123,\n       123]
          Okay: aaa = ("bbb "\n       "ccc")
          Okay: aaa = "bbb " \\n    "ccc"
          Okay: aaa = 123  # \\

          Line too long (91 > 79 characters)
          Open

                      artifact_type (str): all SDC artifact types are supported (DCAE_*, HEAT_*, ...)
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (100 > 79 characters)
          Open

          class Service(SdcResource):  # pylint: disable=too-many-instance-attributes, too-many-public-methods
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (88 > 79 characters)
          Open

                           resources: List[SdcResource] = None, properties: List[Property] = None,
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (91 > 79 characters)
          Open

                  same. The difference is only for the Vnf which can have vf modules associated with.
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (86 > 79 characters)
          Open

                                                                 self.metadata_url)["metadata"]\
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (85 > 79 characters)
          Open

                      self._logger.error(("an error occured during file upload for an Artifact"
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (134 > 79 characters)
          Open

              def __init__(self, name: str = None, version: str = None, sdc_values: Dict[str, str] = None,  # pylint: disable=too-many-arguments
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (88 > 79 characters)
          Open

                      properties (List[Property], optional): list of properties to add to service.
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (90 > 79 characters)
          Open

          from onapsdk.utils.headers_creator import headers_sdc_creator, headers_sdc_artifact_upload
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (87 > 79 characters)
          Open

                  super().__init__(sdc_values=sdc_values, version=version, properties=properties,
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (90 > 79 characters)
          Open

                      instantiation_type (ServiceInstantiationType, optional): service instantiation
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (91 > 79 characters)
          Open

                  return any((component.origin_type == origin_type for component in self.components))
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (93 > 79 characters)
          Open

                                         artifact_label=f"sdk{Path.PurePosixPath(artifact_name).stem}",
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (81 > 79 characters)
          Open

                      inputs (List[Union[Property, NestedInput]], optional): list of inputs
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (80 > 79 characters)
          Open

                  If no category values are provided default category is going to be used.
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (89 > 79 characters)
          Open

                  Vf modules could have "vf_module_label" property with"base_template_dummy_ignore"
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (80 > 79 characters)
          Open

                              if not any([property_def["name"] == "vf_module_label"] and \
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (84 > 79 characters)
          Open

                      bool: True if service has at least one component with given origin type,
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (84 > 79 characters)
          Open

                          f"{self.unique_identifier}/filteredDataByParams?include=properties")
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          Too many blank lines (2)
          Open

              def add_artifact_to_vf(self, vnf_name: str, artifact_type: str,
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Separate top-level function and class definitions with two blank lines.

          Method definitions inside a class are separated by a single blank
          line.
          
          Extra blank lines may be used (sparingly) to separate groups of
          related functions.  Blank lines may be omitted between a bunch of
          related one-liners (e.g. a set of dummy implementations).
          
          Use blank lines in functions, sparingly, to indicate logical
          sections.
          
          Okay: def a():\n    pass\n\n\ndef b():\n    pass
          Okay: def a():\n    pass\n\n\nasync def b():\n    pass
          Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
          Okay: default = 1\nfoo = 1
          Okay: classify = 1\nfoo = 1
          
          E301: class Foo:\n    b = 0\n    def bar():\n        pass
          E302: def a():\n    pass\n\ndef b(n):\n    pass
          E302: def a():\n    pass\n\nasync def b(n):\n    pass
          E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
          E303: def a():\n\n\n\n    pass
          E304: @decorator\n\ndef a():\n    pass
          E305: def a():\n    pass\na()
          E306: def a():\n    def b():\n        pass\n    def c():\n        pass

          Line too long (87 > 79 characters)
          Open

          from typing import Dict, List, Callable, Iterator, Optional, Type, Union, Any, BinaryIO
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (89 > 79 characters)
          Open

                  self._instantiation_type: Optional[ServiceInstantiationType] = instantiation_type
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (82 > 79 characters)
          Open

                  The base of the all node template types objects (Vnf, Pnf, Network) is the
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (97 > 79 characters)
          Open

                      component (Component): Component on which base node template object should be created
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          Continuation line over-indented for visual indent
          Open

                                          property_def in vf_module["properties"]):
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Continuation lines indentation.

          Continuation lines should align wrapped elements either vertically
          using Python's implicit line joining inside parentheses, brackets
          and braces, or using a hanging indent.
          
          When using a hanging indent these considerations should be applied:
          - there should be no arguments on the first line, and
          - further indentation should be used to clearly distinguish itself
            as a continuation line.
          
          Okay: a = (\n)
          E123: a = (\n    )
          
          Okay: a = (\n    42)
          E121: a = (\n   42)
          E122: a = (\n42)
          E123: a = (\n    42\n    )
          E124: a = (24,\n     42\n)
          E125: if (\n    b):\n    pass
          E126: a = (\n        42)
          E127: a = (24,\n      42)
          E128: a = (24,\n    42)
          E129: if (a or\n    b):\n    pass
          E131: a = (\n    42\n 24)

          Line too long (82 > 79 characters)
          Open

                                      model_customization_id=vf_module["customizationUUID"],
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (87 > 79 characters)
          Open

                                                  property_def["name"] == "vf_module_label" and \
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          Continuation line unaligned for hanging indent
          Open

                                              if property_def["value"] and not (
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Continuation lines indentation.

          Continuation lines should align wrapped elements either vertically
          using Python's implicit line joining inside parentheses, brackets
          and braces, or using a hanging indent.
          
          When using a hanging indent these considerations should be applied:
          - there should be no arguments on the first line, and
          - further indentation should be used to clearly distinguish itself
            as a continuation line.
          
          Okay: a = (\n)
          E123: a = (\n    )
          
          Okay: a = (\n    42)
          E121: a = (\n   42)
          E122: a = (\n42)
          E123: a = (\n    42\n    )
          E124: a = (24,\n     42\n)
          E125: if (\n    b):\n    pass
          E126: a = (\n        42)
          E127: a = (24,\n      42)
          E128: a = (24,\n    42)
          E129: if (a or\n    b):\n    pass
          E131: a = (\n    42\n 24)

          Whitespace before '['
          Open

                                                                 self.metadata_url)["metadata"]\
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Avoid extraneous whitespace.

          Avoid extraneous whitespace in the following situations:
          - before the open parenthesis that starts the argument list of a
            function call.
          - before the open parenthesis that starts an indexing or slicing.
          
          Okay: spam(1)
          E211: spam (1)
          
          Okay: dict['key'] = list[index]
          E211: dict ['key'] = list[index]
          E211: dict['key'] = list [index]

          Continuation line over-indented for visual indent
          Open

                               None,
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Continuation lines indentation.

          Continuation lines should align wrapped elements either vertically
          using Python's implicit line joining inside parentheses, brackets
          and braces, or using a hanging indent.
          
          When using a hanging indent these considerations should be applied:
          - there should be no arguments on the first line, and
          - further indentation should be used to clearly distinguish itself
            as a continuation line.
          
          Okay: a = (\n)
          E123: a = (\n    )
          
          Okay: a = (\n    42)
          E121: a = (\n   42)
          E122: a = (\n42)
          E123: a = (\n    42\n    )
          E124: a = (24,\n     42\n)
          E125: if (\n    b):\n    pass
          E126: a = (\n        42)
          E127: a = (24,\n      42)
          E128: a = (24,\n    42)
          E129: if (a or\n    b):\n    pass
          E131: a = (\n    42\n 24)

          Line too long (94 > 79 characters)
          Open

                                                                                   ["instantiationType"]
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (87 > 79 characters)
          Open

                                         b64_artifact=base64.b64encode(artifact).decode('utf-8'))
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (84 > 79 characters)
          Open

              def get_component_properties_value_set_url(self, component: "Component") -> str:
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (99 > 79 characters)
          Open

                           category: str = None, role: str = "", function: str = "", service_type: str = ""):
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (91 > 79 characters)
          Open

                                                                 f"Get service {self.name} metadata",
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (100 > 79 characters)
          Open

                          f"componentInstances/{component.unique_id}/{component.actual_component_uid}/inputs")
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (97 > 79 characters)
          Open

                                                      property_def["value"] == "base_template_dummy_ignore"
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          The backslash is redundant between brackets
          Open

                                          ) for property_def in vf_module["properties"] \
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Avoid explicit line join between brackets.

          The preferred way of wrapping long lines is by using Python's
          implied line continuation inside parentheses, brackets and braces.
          Long lines can be broken over multiple lines by wrapping expressions
          in parentheses.  These should be used in preference to using a
          backslash for line continuation.
          
          E502: aaa = [123, \\n       123]
          E502: aaa = ("bbb " \\n       "ccc")
          
          Okay: aaa = [123,\n       123]
          Okay: aaa = ("bbb "\n       "ccc")
          Okay: aaa = "bbb " \\n    "ccc"
          Okay: aaa = 123  # \\

          Line too long (82 > 79 characters)
          Open

                  In template generation is checked if Service has some types of components,
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (93 > 79 characters)
          Open

                          f"{self.unique_identifier}/filteredDataByParams?include=deploymentArtifacts")
          Severity: Minor
          Found in src/onapsdk/sdc/service.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 (86 > 79 characters)
          Open

                          to declare for service. It can be both Property or NestedInput object.
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          Continuation line under-indented for visual indent
          Open

                                      property_def["value"] == "base_template_dummy_ignore" for \
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Continuation lines indentation.

          Continuation lines should align wrapped elements either vertically
          using Python's implicit line joining inside parentheses, brackets
          and braces, or using a hanging indent.
          
          When using a hanging indent these considerations should be applied:
          - there should be no arguments on the first line, and
          - further indentation should be used to clearly distinguish itself
            as a continuation line.
          
          Okay: a = (\n)
          E123: a = (\n    )
          
          Okay: a = (\n    42)
          E121: a = (\n   42)
          E122: a = (\n42)
          E123: a = (\n    42\n    )
          E124: a = (24,\n     42\n)
          E125: if (\n    b):\n    pass
          E126: a = (\n        42)
          E127: a = (24,\n      42)
          E128: a = (24,\n    42)
          E129: if (a or\n    b):\n    pass
          E131: a = (\n    42\n 24)

          Line too long (92 > 79 characters)
          Open

                               role=self.role, service_type=self.service_type, function=self.function)
          Severity: Minor
          Found in src/onapsdk/sdc/service.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.

          The backslash is redundant between brackets
          Open

                                                  property_def["name"] == "vf_module_label" and \
          Severity: Minor
          Found in src/onapsdk/sdc/service.py by pep8

          Avoid explicit line join between brackets.

          The preferred way of wrapping long lines is by using Python's
          implied line continuation inside parentheses, brackets and braces.
          Long lines can be broken over multiple lines by wrapping expressions
          in parentheses.  These should be used in preference to using a
          backslash for line continuation.
          
          E502: aaa = [123, \\n       123]
          E502: aaa = ("bbb " \\n       "ccc")
          
          Okay: aaa = [123,\n       123]
          Okay: aaa = ("bbb "\n       "ccc")
          Okay: aaa = "bbb " \\n    "ccc"
          Okay: aaa = 123  # \\

          There are no issues that match your filters.

          Category
          Status