Showing 376 of 433 total issues
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function calc_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def calc_loss(self, observed_data, cond_mask, indicating_mask, side_info, is_train, set_t=-1):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, in_planes, kernel_size, dropout, groups, hidden_size, INN):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function forward
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, delta=None):
Function sample_factor_v
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sample_factor_v(tau_sparse_tensor, tau_ind, U, V, X, beta0=1):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, in_planes, kernel, dropout, groups, hidden_size, INN):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function wrapper
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def wrapper(self, *args, key_namespace=None, fetch=False, set_cache=True, **kwargs):
Function forward
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(self, qk, v, query_len=None, input_mask=None, input_attn_mask=None, **kwargs):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function forward
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def forward(
self,
x: Union[Tensor, PairTensor],
p_t: Tensor,
edge_index: Adj,
- 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
Avoid deeply nested control flow statements. Open
Open
if hasattr(value, "__iter__"):
value = [datetime.fromtimestamp(ts) for ts in value]
else:
value = datetime.fromtimestamp(value)
datadict[key] = value
Function _get_data_sizes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def _get_data_sizes(self) -> Tuple[int, ...]:
"""Detect the data sample sizes in the dataset and return the numbers.
Returns
-------
- 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"