Function __construct_expression
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __construct_expression(self, expressions, op, left, right):
if op in ['eq', '=', '==']:
return ProxyEqual(left, right)
if op in ['ne', '!=']:
- 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_string_parts
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __parse_string_parts(self, parts, offset=0, parameters=None):
if (len(parts) - 1) % 2 > 0:
raise ValueError('Incorrect number of expression parts')
if parts[0] == '(' and parts[-1] == ')':
- 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 __resolve_string_value
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __resolve_string_value(self, value, offset=0, parameters=None):
if isinstance(value, BaseExpression):
return offset, value
if isinstance(value, list):
- 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_string
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __parse_string(self, value, *parameters):
if not value:
return []
if len(parameters) == 1 and type(parameters[0]) is tuple:
- 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
Avoid too many return
statements within this function. Open
return offset, int(value)
Avoid too many return
statements within this function. Open
return ProxyOr(left, right)
Avoid too many return
statements within this function. Open
return offset, self.model.Internal.properties_by_name[value]
Avoid too many return
statements within this function. Open
return offset, value[1:-1]
Avoid too many return
statements within this function. Open
return ProxyGreaterThan(left, right)
Avoid too many return
statements within this function. Open
return ProxyGreaterThanOrEqual(left, right)
Avoid too many return
statements within this function. Open
return None