Showing 369 of 369 total issues
Function __init__
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(
self,
graph: Graph,
support: Graph,
kernels: Optional[List[tf.SparseTensor]],
- 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 39 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 39 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 38 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 38 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 37 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
File perceptron.py
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing Perceptron for edge prediction."""
import json
from typing import Any, Dict, List, Optional, Union
import compress_json
Function __init__
has 36 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 36 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 33 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 33 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
File gcn.py
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""GCN model for edge-label prediction."""
from typing import Dict, List, Optional, Type, Union, Any
import numpy as np
from ensmallen import Graph
Function __init__
has 32 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
File gcn.py
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""GCN model for node-label prediction."""
from typing import List, Union, Optional, Dict, Type, Tuple, Any
import numpy as np
from tensorflow.keras.layers import Dense, Concatenate # pylint: disable=import-error,no-name-in-module
Function edge_prediction_evaluation
has 31 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def edge_prediction_evaluation(
Function __init__
has 30 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 29 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 28 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 28 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Consider simplifying this complex logical expression. Open
Open
if issubclass(type(node_feature), AbstractEmbeddingModel):
if skip_evaluation_biased_feature and (
cls.task_involves_edge_types()
and node_feature.can_use_edge_types()
and node_feature.is_using_edge_types()