aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sec_certs/utils/plot_utils.py
diff options
context:
space:
mode:
authoradamjanovsky2023-11-14 14:53:41 +0100
committerGitHub2023-11-14 14:53:41 +0100
commitf0f7fa7e6784afefb945effbc9834209a673db47 (patch)
treebf1cd8f68a4b0b586ed9483fd0c39f7ed566a55d /src/sec_certs/utils/plot_utils.py
parent1ccca9ae8afa8e6574e1cbba2c93b8d5428e2b2e (diff)
parentacfc35f1ced17a4c0918bd6e4e4e146e86552705 (diff)
downloadsec-certs-f0f7fa7e6784afefb945effbc9834209a673db47.tar.gz
sec-certs-f0f7fa7e6784afefb945effbc9834209a673db47.tar.zst
sec-certs-f0f7fa7e6784afefb945effbc9834209a673db47.zip
Merge pull request #374 from crocs-muni/bump-req-python-to-3-10
Bump req python to 3 10
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()