From 9377fa0e793fa378b5797690ad280df12e4c35fe Mon Sep 17 00:00:00 2001 From: "Laura Luebbert, Ph.D." <56094636+lauraluebbert@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:29:57 -0400 Subject: [PATCH] Remove type hinting to support earlier Python versions --- gget/gget_cbio.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gget/gget_cbio.py b/gget/gget_cbio.py index 6fddb607..9ec1c0e6 100644 --- a/gget/gget_cbio.py +++ b/gget/gget_cbio.py @@ -145,7 +145,7 @@ def _download_file_from_git_lfs( class _LFSDownloadPlan: def __init__(self, verbose = False): - self.objects: list[tuple[str, tuple[str, int]]] = [] + self.objects = [] """(target_path, (oid, size))""" self.verbose = verbose @@ -235,7 +235,7 @@ def download_cbioportal_data( lines = response.content.decode().splitlines(keepends=True) - fields: dict[str, str] = {} + fields = {} for line in lines: k, v = line.split(" ", 1) @@ -494,7 +494,7 @@ def __init__( "Hugo_Symbol" if self.merge_type == _SYMBOL else "Ensembl_Gene_ID" ) - self.df_collection: dict[str, dict[str, pd.DataFrame]] = {} + self.df_collection = {} self.big_combined_df = self._create_study_dataframes() def _create_single_study_dataframe(self, study_id: str) -> pd.DataFrame: @@ -985,7 +985,7 @@ def plot_heatmap( norm = TwoSlopeNorm(vmin=min_value, vcenter=0, vmax=max_value) elif variation_type == "Consequence": - consequences: list[Union[str, float]] = list( + consequences = list( self.big_combined_df["Consequence"].unique() ) @@ -1013,7 +1013,7 @@ def plot_heatmap( ) levels = list(range(min_value, max_value)) - string_to_int: dict[Union[str, float], int] = { + string_to_int = { consequence: i for i, consequence in enumerate(consequences) } @@ -1062,7 +1062,7 @@ def plot_heatmap( cbar = plt.colorbar(label=colorbar_label, ticks=levels) - labels: list[Union[str, int]] = levels.copy() + labels = levels.copy() if nas_present: labels[0] = "NaN"