Showing 195 of 195 total issues
Function fit_transform
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def fit_transform(self, data, key):
"""
Performs linear interpolation for small gaps and, if full_imputation is True
applies a multi-step imputation process for larger gaps.
- 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 get_transformer_decoder
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_transformer_decoder(
Function gmm_model_selection
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def gmm_model_selection(
Avoid deeply nested control flow statements. Open
Open
if "polygonal" in arena_type or len(corners) < 5:
cv2.line(
frame_copy,
(corners[c - 1][0], corners[c - 1][1]),
(corners[c][0], corners[c][1]),
Function rotate_all_numba
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def rotate_all_numba(data: np.array, angles: np.array) -> np.array: # pragma: no cover
"""Rotates Return a 2D numpy.ndarray with the initial values rotated by angles radians.
Args:
p (numpy.ndarray): 2D Array containing positions of bodyparts over time.
- 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
Consider simplifying this complex logical expression. Open
Open
if (
not aggregate_experiments
and embeddings is not None
and normative_model
or not aggregate_experiments
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create(
Function plot_arena
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_arena(
Function rolling_window
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def rolling_window(
Function explain_clusters
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def explain_clusters(
Function fc_loss
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fc_loss(
Function call
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def call(
Function load_table
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def load_table(
Function call
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def call(
Function rts_smoother_numba
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def rts_smoother_numba(measurements, F, H, Q, R): # pragma: no cover
Function click_on_corners
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def click_on_corners(event, x, y, flags, param):
Function get_distances
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_distances(
Function train_supervised_cluster_detectors
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def train_supervised_cluster_detectors(
Function get_angles
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_angles(
Function _preprocess_time_bins
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _preprocess_time_bins(