Showing 11,634 of 11,634 total issues
Function format_filename
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def format_filename(prefix, bsz_per_host, seq_len, bi_data, suffix,
mask_alpha=5, mask_beta=1, reuse_len=None, uncased=False,
fixed_num_predict=None):
"""docs."""
if reuse_len is None:
- 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_callbacks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_callbacks(pruning_method=None,
enable_checkpoint_and_export=False,
model_dir=None):
"""Returns common callbacks."""
time_callback = keras_utils.TimeHistory(
- 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 preprocess_image
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def preprocess_image(image_buffer,
Function convert_single_example
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert_single_example(example_index, example, label_list, max_seq_length,
Function translate_and_compute_bleu
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def translate_and_compute_bleu(model,
Function _generate_subtokens_with_target_vocab_size
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _generate_subtokens_with_target_vocab_size(token_counts,
Function resnet50
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def resnet50(num_classes,
Function gaussian_filter2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def gaussian_filter2d(
Function testAnchorGenerationAreCentered
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def testAnchorGenerationAreCentered(self, min_level, max_level, num_scales,
Function transform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def transform(
Function _fill_rectangle_video
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fill_rectangle_video(image,
Function preprocess_for_train
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def preprocess_for_train(image_bytes: tf.Tensor,
Function _apply_multi_bbox_augmentation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _apply_multi_bbox_augmentation(image, bboxes, prob, aug_func,
Function eval_squad
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def eval_squad(strategy,
Function bilinear_resize_to_bbox
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def bilinear_resize_to_bbox(
images: tf.Tensor, bbox: tf.Tensor, output_size: tf.Tensor
) -> tf.Tensor:
"""Bilinear resizes the images to fit into the bounding boxes in the output.
- 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 testLabelAnchors
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def testLabelAnchors(self, min_level, max_level, num_scales, aspect_ratios,
Function classifier_model
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def classifier_model(bert_config,
Function _parse_policy_info
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _parse_policy_info(name: Text, prob: float, level: float,
Function _fill_rectangle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _fill_rectangle(image,
Function testAnchorGenerationWithImageSizeAsTensor
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def testAnchorGenerationWithImageSizeAsTensor(self,