File settings.py
has 648 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; specifically version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
Function __init__
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function register_option
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def register_option(
Function add_argparser_to_option
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_argparser_to_option(
Function add_argparser
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_argparser(
Function merge_with_arguments
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def merge_with_arguments(self, arg_parse_config):
"""Merge the current settings with the command-line args.
After parsing argument options this method should be executed to have
an unified settings.
- 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 arg_parse_args
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def arg_parse_args(self):
args = {"help": self.argparse_help_msg, "default": None}
if self.nargs:
args["nargs"] = self.nargs
- 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 set_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_value(self, value, convert=False):
dst_type = self.key_type
if convert is False:
self._value = value
- 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"