Showing 11 of 11 total issues
Function point_list_filter
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def point_list_filter(
point_list: typing.Sequence, distance: float, point_limit: int = None
) -> typing.Sequence:
""" remove some points which are too close """
if not point_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"
Further reading
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function execute
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(
Function execute
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function compress_frame
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def compress_frame(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _compare_template
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compare_template(
self,
template_pic_object: np.ndarray,
target_pic_object: np.ndarray,
scale: typing.Sequence,
- 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 analyse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def analyse():
# required
# support multi pictures, split with ','
template_name = request.form.get("template_name")
template_name_list = template_name.split(",") if template_name else 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 _find_with_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _find_with_template(
self, target_pic_object: np.ndarray, _mark_pic: bool = None, *args, **kwargs
) -> dict:
# pre assert
assert not self.template.is_empty(), "template is empty"
- 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"