Showing 11,634 of 11,634 total issues
Function call
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def call(self, x, enc, cache, mask_self, mask_cross, training):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(self, model: tf_keras.Model):
"""Loading pretrained checkpoint."""
if not self._task_config.init_checkpoint:
return
- 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 build_response_seq_from_bbox
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_response_seq_from_bbox(
Function single_stage_hourglass
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def single_stage_hourglass(input_channel_dims, channel_dims_per_stage,
Function call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def call(self,
target,
memory,
self_attention_mask=None,
cross_attention_mask=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 true_fn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def true_fn(box, label, weight,
Function test_network_creation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_network_creation(self, input_size, model_id, endpoint_filter_scale,
Function resize_and_pad
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def resize_and_pad(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
dim,
mlp_ratio,
num_heads,
- 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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function resize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def resize(feat,
Function test_creation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def test_creation(self, input_shape, filters, strides,
use_transpose_conv):
kernel_size = 3
n, h, w, _ = input_shape
inputs = tf_keras.Input(shape=input_shape[1:], batch_size=n)
- 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_video_matrix
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_video_matrix(features, feature_size, dtype, max_frames,
Function fit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fit(model,
strategy,
train_dataset,
model_dir,
init_checkpoint_path=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 _pad_to_multiple
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _pad_to_multiple(tensor: tf.Tensor,
Function sample_k_from_softmax
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def sample_k_from_softmax(logits, k, disallow=None, use_topk=False):
"""Implement softmax sampling using gumbel softmax trick to select k items.
Args:
logits: A [batch_size, num_token_predictions, vocab_size] tensor indicating
- 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 apply_transform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def apply_transform(i, x, brightness, contrast, saturation, hue):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(