aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sec_certs/utils/plot_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sec_certs/utils/plot_utils.py')
-rw-r--r--src/sec_certs/utils/plot_utils.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sec_certs/utils/plot_utils.py b/src/sec_certs/utils/plot_utils.py
index b9e7ac7c..eca79070 100644
--- a/src/sec_certs/utils/plot_utils.py
+++ b/src/sec_certs/utils/plot_utils.py
@@ -1,5 +1,3 @@
-from typing import Dict, List, Tuple
-
from networkx import DiGraph
from pandas import DataFrame
@@ -20,8 +18,8 @@ def get_cert_property(df: DataFrame, cert_id: int, column: str) -> str:
def get_fips_cert_references_graph(
- df: DataFrame, cert_id: int, colour_mapper: Dict[str, str]
-) -> Tuple[DiGraph, List[str]]:
+ df: DataFrame, cert_id: int, colour_mapper: dict[str, str]
+) -> tuple[DiGraph, list[str]]:
if cert_id not in df["cert_id"].unique():
raise ValueError(f"Cert ID: {cert_id} is not in the dataset")
@@ -45,7 +43,7 @@ def get_fips_cert_references_graph(
return graph, colour_map
-def get_most_referenced_cert_graph(df: DataFrame, status_colour_mapper: Dict[str, str]) -> Tuple[DiGraph, List[str]]:
+def get_most_referenced_cert_graph(df: DataFrame, status_colour_mapper: dict[str, str]) -> tuple[DiGraph, list[str]]:
graph = DiGraph()
colour_map = []
max_referenced_by_num = df["incoming_direct_references_count"].max()
@@ -66,7 +64,7 @@ def get_most_referenced_cert_graph(df: DataFrame, status_colour_mapper: Dict[str
return graph, colour_map
-def get_most_referencing_cert_graph(df: DataFrame, status_colour_mapper: Dict[str, str]) -> Tuple[DiGraph, List[str]]:
+def get_most_referencing_cert_graph(df: DataFrame, status_colour_mapper: dict[str, str]) -> tuple[DiGraph, list[str]]:
graph = DiGraph()
colour_map = []
max_referencing_num = df["outgoing_direct_references_count"].max()