Showing 10 of 10 total issues
Function _get_account_info_if_not_exist
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def _get_account_info_if_not_exist(self):
"""
Method to fetch the account from the user
"""
if self.conjurrc_data.conjur_account is None:
- 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 _run_command_flow
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _run_command_flow(self, args, resource):
ssl_verification_meta_data = get_ssl_verification_meta_data_from_conjurrc(args.ssl_verify)
conjurrc_data = ConjurrcData.load_from_file()
client = Client(ssl_verification_mode=ssl_verification_meta_data.mode,
connection_info=conjurrc_data.get_client_connection_info(),
- 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 handle_init_logic
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_init_logic(
Function run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run(self):
"""
Main entrypoint for the class invocation from both CLI, Package, and
test sources. Parses CLI args and invokes the appropriate client command.
"""
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, conjur_url: str = None, account: str = None, cert_file: str = None,
Function handle_init_logic
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_init_logic(
url: str = None, account: str = None,
authn_type: str = None, service_id: str = None,
cert: str = None, force: bool = None,
ssl_verify=None, is_self_signed: bool = False,
- 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 is_exists
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def is_exists(self, conjur_url: str) -> bool:
if not os.path.exists(DEFAULT_NETRC_FILE) or os.path.getsize(DEFAULT_NETRC_FILE) == 0:
return False
netrc_auth = ""
- 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 validate_init_action_ssl_verification_input
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_init_action_ssl_verification_input(ca_path, is_self_signed, ssl_verify):
"""
Validate the input related to ssl verification for the init action
"""
use_ca_bundle = False
- 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 parse_args
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_args(self, args: list = None, namespace: str = None, resource: str = None) -> list:
args, arg_flags = self.parse_known_args(args, namespace)
resource = args.resource if args else None
if arg_flags:
- 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 __repr__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __repr__(self) -> str:
result = []
# pylint: disable=multiple-statements
if self.kind: result.append(f"'kind': '{self.kind}'")
if self.limit: result.append(f"'limit': '{self.limit}'")
- 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"