Showing 11,634 of 11,634 total issues
Function testAffineWarpImage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def testAffineWarpImage(self,
Function _scale_boxes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _scale_boxes(encoded_boxes, width, height, anchor_grid, grid_points,
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
model_id: int,
input_channel_dims: int,
input_specs=tf_keras.layers.InputSpec(shape=[None, None, None, 3]),
- 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 image_rand_hsv
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def image_rand_hsv(image, rh, rs, rv, seed=None, darknet=False):
Function _new_coord_scale_boxes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _new_coord_scale_boxes(encoded_boxes, width, height, anchor_grid,
Function read
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def read(self,
Function _anchor_free_scale_boxes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _anchor_free_scale_boxes(encoded_boxes,
Function convert
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(checkpoint_from_path,
Function get_boxes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_boxes(self,
Function _get_centers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_centers(self, boxes, classes, anchors, width, height, scale_xy):
Function convert_checkpoint
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert_checkpoint(model_id: int,
Function build_label_per_path
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_label_per_path(self,
Function build_grid
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_grid(indexes, truths, preds, ind_mask, update=False, grid=None):
Avoid deeply nested control flow statements. Open
if not self.is_train or ent_type != "O":
spans.append((i, j, "mask", ent_type))
else:
negative_spans.append((i, j, "mask", ent_type))
intersection_size = (is_token_entity_prefix[j + 1] -
Function __call__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(self, true_counts, inds, y_true, boxes, classes, y_pred):
Function build_bert_pretrainer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build_bert_pretrainer(pretrainer_cfg: params.PretrainerModelParams,
encoder: Optional[tf_keras.Model] = None,
masked_lm: Optional[tf_keras.Model] = None,
quantization_friendly: Optional[bool] = False,
name: Optional[str] = None) -> tf_keras.Model:
- 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 _compute_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compute_loss(self, true_counts, inds, y_true, boxes, classes, y_pred):
Function _compute_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compute_loss(self, true_counts, inds, y_true, boxes, classes, y_pred):
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
filters=1,
kernel_size=(1, 1),
strides=(1, 1),
padding='same',
- 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 test_parser
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def test_parser(self, output_size, dtype, is_training, aug_name,
is_multilabel, decode_jpeg_only, image_format):
serialized_example = tfexample_utils.create_classification_example(
output_size[0], output_size[1], image_format, is_multilabel)
- 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"