From 4cea98eff04c4bd6027e2271f3320a7069162ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Provins?= Date: Wed, 1 May 2024 18:19:50 +0200 Subject: [PATCH] sty: run ruff --- mriqc_learn/datasets/__init__.py | 10 ++++------ mriqc_learn/models/production.py | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mriqc_learn/datasets/__init__.py b/mriqc_learn/datasets/__init__.py index c882517..f85ea4e 100644 --- a/mriqc_learn/datasets/__init__.py +++ b/mriqc_learn/datasets/__init__.py @@ -21,6 +21,7 @@ # https://www.nipreps.org/community/licensing/ # """Public API for MRIQC-learn datasets.""" + from pathlib import Path from pkg_resources import resource_filename as pkgrf @@ -101,7 +102,7 @@ def load_data( if split_strategy is None or split_strategy.lower() == "none": return ( dataframe[dataframe.columns[xy_index:]], - dataframe[dataframe.columns[:xy_index]] + dataframe[dataframe.columns[:xy_index]], ), (None, None) n = len(dataframe) @@ -122,8 +123,5 @@ def load_data( return ( train_df[dataframe.columns[xy_index:]], - train_df[dataframe.columns[:xy_index]] - ), ( - test_df[dataframe.columns[xy_index:]], - test_df[dataframe.columns[:xy_index]] - ) + train_df[dataframe.columns[:xy_index]], + ), (test_df[dataframe.columns[xy_index:]], test_df[dataframe.columns[:xy_index]]) diff --git a/mriqc_learn/models/production.py b/mriqc_learn/models/production.py index 559f738..8a88c3d 100644 --- a/mriqc_learn/models/production.py +++ b/mriqc_learn/models/production.py @@ -21,6 +21,7 @@ # https://www.nipreps.org/community/licensing/ # """Create a pipeline for nested cross-validation.""" + from pkg_resources import resource_filename as pkgrf from joblib import load