diff options
| author | Adam Janovsky | 2023-11-14 14:25:05 +0100 |
|---|---|---|
| committer | Adam Janovsky | 2023-11-14 14:25:05 +0100 |
| commit | 76219404a0b70bebf1778cf237bb84427b92bc45 (patch) | |
| tree | 0a95d2eda641f9bb8bdd8da9e86e7c836a645efa /src/sec_certs/utils/plot_utils.py | |
| parent | 0f35424e75ff56597c00e638b6b615d01f2fe080 (diff) | |
| download | sec-certs-76219404a0b70bebf1778cf237bb84427b92bc45.tar.gz sec-certs-76219404a0b70bebf1778cf237bb84427b92bc45.tar.zst sec-certs-76219404a0b70bebf1778cf237bb84427b92bc45.zip | |
bump required python to 3.8
Diffstat (limited to 'src/sec_certs/utils/plot_utils.py')
| -rw-r--r-- | src/sec_certs/utils/plot_utils.py | 10 |
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() |
