Showing 9 of 9 total issues
File pyadigraph.py
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import networkx as nx
from typing import Dict, Tuple, List, Union
import os
Function __init__
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function add_graph
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_graph(
Function _adigraph
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _adigraph(
Function _edges
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _edges(self, edges: List[Tuple[str, str]], weights: Dict[str, float], colors: Dict[str, str], default_color: str, widths: Dict[str, float], labels: Dict[str, str], directed: bool)->str:
Function _vertices
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _vertices(self, vertices: List[str], layout: Dict[str, Tuple[float, float]], colors: Dict[str, str], default_color: str, widths: Dict[str, float], labels: Dict[str, str])->str:
Function _vertex
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _vertex(self, vertex: str, x: float, y: float, color: str, width: float, label: str)->str:
Function _edge
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _edge(self, start: str, end: str, weight: float, color: str, width: float, label: str)->str:
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(self,
row_size: int=2,
vertices_color_fallback: str="",
edges_color_fallback: str="",
layout: Dict[str, Tuple[float, float]]=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"