diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 11f542b..ab94d51 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,29 +5,29 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 24.2.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 exclude: ^(pydra_ml/_version\.py|versioneer\.py)$ - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] exclude: ^(pydra_ml/_version\.py|versioneer\.py)$ - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.2.6 hooks: - id: codespell exclude: ^(pydra_ml/_version\.py|versioneer\.py)$ diff --git a/pydra_ml/report.py b/pydra_ml/report.py index d292854..e6a4b5b 100644 --- a/pydra_ml/report.py +++ b/pydra_ml/report.py @@ -37,9 +37,9 @@ def performance_table(df, output_dir, round_decimals=2): df_clf = df_clf.reset_index(drop=True) df_metric_data_clean[clf] = df_clf df_metric_data_clean_median = df_metric_data_clean.median().T - df_metric_data_clean.loc[ - len(df_metric_data_clean) - ] = df_metric_data_clean_median + df_metric_data_clean.loc[len(df_metric_data_clean)] = ( + df_metric_data_clean_median + ) df_metric_data_clean.index = list(df_metric_data_clean.index[:-1]) + ["median"] df_metric_data_clean.to_csv( os.path.join( @@ -77,9 +77,9 @@ def performance_table(df, output_dir, round_decimals=2): ) if "null" in df_metric.type.unique(): null_median = round(df_metric_null_clean_median[clf], 2) - df_summary.loc[ - 0, clf - ] = f"{data_median} [{ci_lower}–{ci_upper}; {null_median}]" + df_summary.loc[0, clf] = ( + f"{data_median} [{ci_lower}–{ci_upper}; {null_median}]" + ) else: df_summary.loc[0, clf] = f"{data_median} [{ci_lower}–{ci_upper}]"