Showing 195 of 195 total issues
Function hard_loss
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def hard_loss(
Function pretrain
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def pretrain(
Function extend
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def extend(
Function climb_wall
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def climb_wall(
arena_type: str,
arena: np.array,
pos_dict: pd.DataFrame,
tol: float,
- 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__(
Function find_learning_rate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_learning_rate(
Function kleinberg
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def kleinberg(
Function kleinberg_core_numba
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def kleinberg_core_numba(
Function outside_ellipse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def outside_ellipse(x, y, e_center, e_axes, e_angle, threshold=0.0):
Function close_single_contact
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def close_single_contact(
Function look_around
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def look_around(
Function following_path
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def following_path(
Function dcl_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def dcl_loss(
Function _scatter_embeddings
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _scatter_embeddings(
Function mask_outliers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def mask_outliers(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function annotate_video
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def annotate_video(
Function separation_between_conditions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def separation_between_conditions(
Function _fit_hmm_range
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _fit_hmm_range(concat_embeddings, states, min_states, max_states):
"""Auxiliary function for fitting a range of HMMs with different number of states.
Args:
concat_embeddings (np.ndarray): Concatenated embeddings across all animal experiments.
- 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 smooth_boolean_array
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def smooth_boolean_array(
a: np.array, scale: int = 1, batch_size: int = 50000
) -> np.array:
"""Return a boolean array in which isolated appearances of a feature are smoothed.
- 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"