Showing 47 of 47 total issues
Function _res_block
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _res_block(x, filters, num_blocks, strides, name, activation):
Function _align_unlabelled_segments_with_adjacents
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _align_unlabelled_segments_with_adjacents(segments, segments_alignment, partitioned_skeletons, frame_rate: float):
"""
Resolve the unaligned segments by comparing with adjacent segments,
starting with the segments that have the least frames gap between an adjacent trusted segment
Don't align isolated segments which a big gap between trusted segments
- 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 _update_coords
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _update_coords(
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 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 _generate_synthetic_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _generate_synthetic_data(
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 __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function segment_foreground
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def segment_foreground(
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 generate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _basic_block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _basic_block(x, filters, strides, name, 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 _build_model
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _build_model(input_shape, out_dim, middle_stack, filters, 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 load_dataset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_dataset(