Showing 45 of 47 total issues
Function generate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def generate(self, file_pattern: str, num_samples: int):
"""
Start the generation of files containing synthetic data
:param file_pattern: Filepath of the files to generate with an "index" variable
- 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 _assemble_images_batch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _assemble_images_batch(
frame_preprocessing: BaseFramePreprocessing,
data_reading_queue,
results_queue,
temp_dir: str,
- 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 _generate_synthetic_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _generate_synthetic_data(
Function _update_coords
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _update_coords(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _validate_features
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _validate_features(raw_features: dict):
if not (
len(raw_features["skeletons"])
== len(raw_features["head_width"])
== len(raw_features["midbody_width"])
- 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_arguments
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _parse_arguments(dataset_path: str, kwargs: dict):
if kwargs.get("work_dir") is None:
kwargs["work_dir"] = default_paths.WORK_DIR
if kwargs.get("batch_size") is None:
kwargs["batch_size"] = 128
- 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 __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function get_tfrecord_dataset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_tfrecord_dataset(
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function load_dataset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_dataset(
Function segment_foreground
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def segment_foreground(
Function _basic_block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _basic_block(x, filters, strides, name, activation):
Function _compare_pred_real
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compare_pred_real(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _build_model
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _build_model(input_shape, out_dim, middle_stack, filters, activation):
Function _complex_crop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _complex_crop(empty_frame, center, out_shape: np.ndarray, processed_frame, worm_roi: Tuple[slice, slice]):
Function generate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate(