Showing 97 of 1,318 total issues
Function add_esr_system_info
has 23 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_esr_system_info(self, # pylint: disable=too-many-arguments, too-many-locals
File loop_instance.py
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
"""Control Loop module."""
import json
Function deep_load
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def deep_load(self) -> None:
"""Deep load Object informations from SDC."""
url = (
f"{self.base_front_url}/sdc1/feProxy/rest/v1/"
"screen?excludeTypes=VFCMT&excludeTypes=Configuration"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
SdcOnboardable
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class SdcOnboardable(SDC, ABC):
"""Base class for onboardable SDC resources (Vendors, Services, ...)."""
ACTION_TEMPLATE: str
ACTION_METHOD: str
Function __init__
has 18 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, # pylint: disable=too-many-arguments, too-many-locals
Function create
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(cls, # pylint: disable=too-many-locals
Function __init__
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, # pylint: disable=too-many-locals
Function create_from_request_response
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def create_from_request_response(cls, request_response: dict) -> "VnfInstantiation":
"""Create VNF instantiation object based on request details.
Raises:
ResourceNotFound: Service related with given object doesn't exist
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, # pylint: disable=too-many-arguments, too-many-locals
service_instance: "ServiceInstance",
vnf_id: str,
vnf_type: str,
in_maint: bool,
File onap_service.py
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
"""ONAP Service module."""
from abc import ABC
File complex.py
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""A&AI Complex module."""
from typing import Any, Dict, Iterator
from urllib.parse import urlencode
from onapsdk.utils.jinja import jinja_env
Function __init__
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function create
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(cls, # pylint: disable=too-many-arguments
Function register_vim
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def register_vim(cls, # pylint: disable=too-many-arguments
Function instantiate_macro
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def instantiate_macro(cls,
Function send_message
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def send_message(cls, method: str, action: str, url: str, # pylint: disable=too-many-locals
**kwargs) -> Union[requests.Response, None]:
"""
Send a message to an ONAP service.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, # pylint: disable=too-many-arguments
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
Function instantiate_macro
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def instantiate_macro(cls, # pylint: disable=too-many-arguments, too-many-locals
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, # pylint: disable=too-many-arguments