From e75e68d9acc9336aea5293f61fa86f7898cd7d39 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:29:04 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/fairlens/metrics/unified.py | 1 - src/fairlens/scorer.py | 1 - src/fairlens/sensitive/detection.py | 1 - 3 files changed, 3 deletions(-) diff --git a/src/fairlens/metrics/unified.py b/src/fairlens/metrics/unified.py index ce49c459..0c3f7d0b 100644 --- a/src/fairlens/metrics/unified.py +++ b/src/fairlens/metrics/unified.py @@ -177,7 +177,6 @@ def _correlation_matrix_helper( cat_num_metric: Callable[[pd.Series, pd.Series], float] = kruskal_wallis, cat_cat_metric: Callable[[pd.Series, pd.Series], float] = cramers_v, ) -> float: - a_type = utils.infer_distr_type(sr_a) b_type = utils.infer_distr_type(sr_b) diff --git a/src/fairlens/scorer.py b/src/fairlens/scorer.py index ca978b3a..7ec020f7 100644 --- a/src/fairlens/scorer.py +++ b/src/fairlens/scorer.py @@ -323,7 +323,6 @@ def _calculate_distance( method: str = "dist_to_all", p_value: bool = False, ) -> pd.DataFrame: - unique = df[sensitive_attrs].drop_duplicates() dist = [] diff --git a/src/fairlens/sensitive/detection.py b/src/fairlens/sensitive/detection.py index 70c1681b..4ce95490 100644 --- a/src/fairlens/sensitive/detection.py +++ b/src/fairlens/sensitive/detection.py @@ -81,7 +81,6 @@ def detect_names_df( sensitive_dict = _detect_names_dict(cols, threshold, str_distance, attr_synonym_dict) if deep_search: - for col in cols: # Series containing only the unique values of the analyzed column. uniques = pd.Series(df[col].unique())