Skip to content

Commit dff20f4

Browse files
committed
Fix flake8 and black errors
1 parent cbab45a commit dff20f4

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

pycanon/report/pdf_utility_report.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
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]:
4040
"""Generate a report with the parameters obtained for each utility metric.
4141
@@ -67,13 +67,13 @@ def get_utility_report_values(
6767

6868

6969
def get_pdf_utility_report(
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",
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",
7777
) -> None:
7878
"""Generate the PDF report both with the utility metrics obtained and the
7979
anonymity parameters.

pycanon/utility/attribute_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def sizes_ec(
2424
data: pd.DataFrame, quasi_ident: typing.Union[typing.List, np.ndarray]
2525
) -> dict:
2626
"""Calculate statistics associated to the equivalence classes.
27-
:param data: dataframe with the data anonymized.
2827
28+
:param data: dataframe with the data anonymized.
2929
:type data: pandas dataframe
3030
3131
:param quasi_ident: list with the name of the columns of the dataframe

pycanon/utility/utility_metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def average_ecsize(
2727
quasi_ident: typing.Union[typing.List, np.ndarray],
2828
sup=True,
2929
) -> float:
30-
"""Calculate the metric "average equivalence class size ". Two scenarios are allowed
30+
"""Calculate the metric average equivalence class size. Two scenarios are allowed
3131
depending on whether any records from the original database have been deleted.
3232
3333
:param data_raw: dataframe with the data raw under study.
@@ -57,7 +57,7 @@ def classification_metric(
5757
quasi_ident: typing.Union[typing.List, np.ndarray],
5858
sens_att: typing.Union[typing.List, np.ndarray],
5959
) -> float:
60-
"""Calculate the metric "classification metric" according to the original (raw)
60+
"""Calculate the classification metric according to the original (raw)
6161
and anonymized datasets.
6262
6363
:param data_raw: dataframe with the data raw under study.
@@ -90,7 +90,7 @@ def discernability_metric(
9090
data_anon: pd.DataFrame,
9191
quasi_ident: typing.Union[typing.List, np.ndarray],
9292
) -> float:
93-
"""Calculate the discernability metric, assuming that all thw equivalence classes
93+
"""Calculate the discernability metric, assuming that all the equivalence classes
9494
have more than k records, and given each suppressed record a penalty of the size
9595
of the input dataset.
9696

0 commit comments

Comments
 (0)