Skip to content

Commit cbab45a

Browse files
committed
Fix flake8 errors
1 parent af391fc commit cbab45a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

pycanon/report/pdf_utility_report.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131

3232

3333
def get_utility_report_values(
34-
data_raw: pd.DataFrame,
35-
data_anon: pd.DataFrame,
36-
quasi_ident: typing.Union[typing.List, np.ndarray],
37-
sens_att: typing.Union[typing.List, np.ndarray],
38-
sup=True,
34+
data_raw: pd.DataFrame,
35+
data_anon: pd.DataFrame,
36+
quasi_ident: typing.Union[typing.List, np.ndarray],
37+
sens_att: typing.Union[typing.List, np.ndarray],
38+
sup=True,
3939
) -> typing.Tuple[float, float, float, dict]:
40-
"""Generate a report with the parameters obtained for each utility mertic.
40+
"""Generate a report with the parameters obtained for each utility metric.
4141
4242
:param data_raw: dataframe with the data raw under study.
4343
:type data_raw: pandas dataframe
@@ -57,7 +57,6 @@ def get_utility_report_values(
5757
original dataset (somo records may have been deleted)-
5858
:type sup: boolean
5959
"""
60-
6160
avg_ec = utility.average_ecsize(data_raw, data_anon, quasi_ident, sup)
6261
cm = utility.classification_metric(data_raw, data_anon, quasi_ident, sens_att)
6362
dm = utility.discernability_metric(data_raw, data_anon, quasi_ident)
@@ -68,13 +67,13 @@ def get_utility_report_values(
6867

6968

7069
def get_pdf_utility_report(
71-
data_raw: pd.DataFrame,
72-
data_anon: pd.DataFrame,
73-
quasi_ident: typing.Union[typing.List, np.ndarray],
74-
sens_att: typing.Union[typing.List, np.ndarray],
75-
sup=True,
76-
gen=True,
77-
file_pdf="utility_report.pdf",
70+
data_raw: pd.DataFrame,
71+
data_anon: pd.DataFrame,
72+
quasi_ident: typing.Union[typing.List, np.ndarray],
73+
sens_att: typing.Union[typing.List, np.ndarray],
74+
sup=True,
75+
gen=True,
76+
file_pdf="utility_report.pdf",
7877
) -> None:
7978
"""Generate the PDF report both with the utility metrics obtained and the
8079
anonymity parameters.

pycanon/utility/attribute_statistics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def sizes_ec(
2525
) -> dict:
2626
"""Calculate statistics associated to the equivalence classes.
2727
:param data: dataframe with the data anonymized.
28+
2829
:type data: pandas dataframe
2930
3031
:param quasi_ident: list with the name of the columns of the dataframe

0 commit comments

Comments
 (0)