File layers.py
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
"""
# Created by Wenjie Du <wenjay.du@gmail.com>
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
in_channels: Union[int, Tuple[int, int]],
out_channels: int,
n_nodes: int,
- 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 message
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def message(
self,
x_i: Tensor,
x_j: Tensor,
edge_weights: Tensor,
- 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 forward
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def forward(
Function message
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def message(
Function message_selfattention
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def message_selfattention(
Function forward
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. 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"