Showing 7 of 57 total issues
Function nth_variation
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def nth_variation(a: Dict, b: Dict, exp: float = 2, overlap: bool = False) -> float:
"""Return the nth power distance beetween the given dictionaries.
Parameters
----------------------------
- 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 chi_square
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def chi_square(a: Dict, b: Dict) -> float:
"""Return the chi square distance beetween the two given dictionaries.
Parameters
----------------------------
- 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 normal_chi_square
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def normal_chi_square(a: Dict, b: Dict) -> float:
"""Return the normalized chi square distance beetween the two given dictionaries.
Parameters
----------------------------
- 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 intersection_nth_variation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def intersection_nth_variation(a: Dict, b: Dict, exp: float=2, overlap: bool=False)->float:
"""Return the nth power distance beetween the insersection of a and b."""
total = 0
n = 0
bget = b.__getitem__
- 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 canberra
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def canberra(a: Dict, b: Dict) -> float:
"""Return the canberra distance beetween the given dictionaries.
Parameters
----------------------------
- 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 kullback_leibler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def kullback_leibler(p: Dict, q: Dict) -> float:
"""Determine the Kullback Leibler divergence beetween the given dictionaries.
Parameters
----------------------------
- 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 chebyshev
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def chebyshev(a: Dict, b: Dict) -> float:
"""Determine the Chebyshev distance beetween the given dictionaries.
Parameters
----------------------------
- 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"