From b8752d50a7cd59cdb416fe86f85da599985da9d2 Mon Sep 17 00:00:00 2001 From: Raphael Vallat Date: Tue, 13 Feb 2024 22:29:33 +0100 Subject: [PATCH] Update black --- notebooks/run_visbrain.py | 1 + yasa/detection.py | 1 + yasa/features.py | 1 + yasa/heart.py | 1 + yasa/hypno.py | 1 + yasa/io.py | 1 + yasa/numba.py | 1 + yasa/others.py | 1 + yasa/plotting.py | 1 + yasa/sleepstats.py | 1 + yasa/spectral.py | 1 + yasa/staging.py | 1 + yasa/tests/test_detection.py | 1 + yasa/tests/test_heart.py | 1 + yasa/tests/test_hypno.py | 1 + yasa/tests/test_hypnoclass.py | 1 + yasa/tests/test_io.py | 1 + yasa/tests/test_numba.py | 1 + yasa/tests/test_others.py | 1 + yasa/tests/test_plotting.py | 1 + yasa/tests/test_sleepstats.py | 1 + yasa/tests/test_spectral.py | 1 + yasa/tests/test_staging.py | 1 + 23 files changed, 23 insertions(+) diff --git a/notebooks/run_visbrain.py b/notebooks/run_visbrain.py index 7e30d8c..d06319c 100644 --- a/notebooks/run_visbrain.py +++ b/notebooks/run_visbrain.py @@ -1,5 +1,6 @@ """This file shows how to use YASA in combination with Visbrain. """ + import numpy as np from visbrain.gui import Sleep from yasa import spindles_detect, sw_detect diff --git a/yasa/detection.py b/yasa/detection.py index fbcd224..9d9bcac 100644 --- a/yasa/detection.py +++ b/yasa/detection.py @@ -6,6 +6,7 @@ - GitHub: https://github.com/raphaelvallat/yasa - License: BSD 3-Clause License """ + import mne import logging import numpy as np diff --git a/yasa/features.py b/yasa/features.py index 3400504..cd2773e 100644 --- a/yasa/features.py +++ b/yasa/features.py @@ -16,6 +16,7 @@ DANGER: This function has not been extensively debugged and validated. Use at your own risk. """ + import mne import yasa import logging diff --git a/yasa/heart.py b/yasa/heart.py index 9881b66..fe7447e 100644 --- a/yasa/heart.py +++ b/yasa/heart.py @@ -4,6 +4,7 @@ Author: Dr Raphael Vallat , UC Berkeley. Date: May 2022 """ + import logging import numpy as np import pandas as pd diff --git a/yasa/hypno.py b/yasa/hypno.py index d67bf82..fbe7ba2 100644 --- a/yasa/hypno.py +++ b/yasa/hypno.py @@ -1,6 +1,7 @@ """ Hypnogram-related functions and class. """ + import mne import logging diff --git a/yasa/io.py b/yasa/io.py index b9a6be5..1e0aaf5 100644 --- a/yasa/io.py +++ b/yasa/io.py @@ -1,5 +1,6 @@ """Helper functions for YASA (e.g. logger) """ + import logging diff --git a/yasa/numba.py b/yasa/numba.py index ff9062d..42c153f 100644 --- a/yasa/numba.py +++ b/yasa/numba.py @@ -1,6 +1,7 @@ """ This file contains Numba-accelerated functions used in the main detections. """ + import numpy as np from numba import jit diff --git a/yasa/others.py b/yasa/others.py index 2a1c6a0..af80928 100644 --- a/yasa/others.py +++ b/yasa/others.py @@ -1,6 +1,7 @@ """ This file contains several helper functions to manipulate 1D and 2D EEG data. """ + import logging import numpy as np from scipy.interpolate import interp1d diff --git a/yasa/plotting.py b/yasa/plotting.py index d8c6b05..6f544e1 100644 --- a/yasa/plotting.py +++ b/yasa/plotting.py @@ -1,6 +1,7 @@ """ Plotting functions of YASA. """ + import mne import numpy as np import pandas as pd diff --git a/yasa/sleepstats.py b/yasa/sleepstats.py index a174b4c..5988350 100644 --- a/yasa/sleepstats.py +++ b/yasa/sleepstats.py @@ -2,6 +2,7 @@ This file contains several helper functions to calculate sleep statistics from a one-dimensional sleep staging vector (hypnogram). """ + # import warnings import numpy as np import pandas as pd diff --git a/yasa/spectral.py b/yasa/spectral.py index 374835f..f675d58 100644 --- a/yasa/spectral.py +++ b/yasa/spectral.py @@ -2,6 +2,7 @@ This file contains several helper functions to calculate spectral power from 1D and 2D EEG data. """ + import mne import logging import numpy as np diff --git a/yasa/staging.py b/yasa/staging.py index 6a0b0b0..7b6df76 100644 --- a/yasa/staging.py +++ b/yasa/staging.py @@ -1,4 +1,5 @@ """Automatic sleep staging of polysomnography data.""" + import os import mne import glob diff --git a/yasa/tests/test_detection.py b/yasa/tests/test_detection.py index 333e006..a9abb22 100644 --- a/yasa/tests/test_detection.py +++ b/yasa/tests/test_detection.py @@ -1,4 +1,5 @@ """Test the functions in yasa/spectral.py.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_heart.py b/yasa/tests/test_heart.py index 873aeb3..0f3a383 100644 --- a/yasa/tests/test_heart.py +++ b/yasa/tests/test_heart.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/heart.py file.""" + import unittest import numpy as np from yasa.heart import hrv_stage diff --git a/yasa/tests/test_hypno.py b/yasa/tests/test_hypno.py index 1c8a2e4..bb7cb12 100644 --- a/yasa/tests/test_hypno.py +++ b/yasa/tests/test_hypno.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/hypno.py file.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_hypnoclass.py b/yasa/tests/test_hypnoclass.py index 74d166d..7adf4fd 100644 --- a/yasa/tests/test_hypnoclass.py +++ b/yasa/tests/test_hypnoclass.py @@ -1,4 +1,5 @@ """Test the class Hypnogram.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_io.py b/yasa/tests/test_io.py index 952a2d3..486a598 100644 --- a/yasa/tests/test_io.py +++ b/yasa/tests/test_io.py @@ -1,4 +1,5 @@ """Test I/O.""" + import pytest import logging import unittest diff --git a/yasa/tests/test_numba.py b/yasa/tests/test_numba.py index ced33af..b9533a8 100644 --- a/yasa/tests/test_numba.py +++ b/yasa/tests/test_numba.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/numba.py file.""" + import unittest import numpy as np from scipy.signal import detrend diff --git a/yasa/tests/test_others.py b/yasa/tests/test_others.py index 478e6bc..a5d5830 100644 --- a/yasa/tests/test_others.py +++ b/yasa/tests/test_others.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/others.py file.""" + import mne import unittest import numpy as np diff --git a/yasa/tests/test_plotting.py b/yasa/tests/test_plotting.py index cb38b1b..330c59a 100644 --- a/yasa/tests/test_plotting.py +++ b/yasa/tests/test_plotting.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/plotting.py file.""" + import pytest import unittest import numpy as np diff --git a/yasa/tests/test_sleepstats.py b/yasa/tests/test_sleepstats.py index fb10761..cda5373 100644 --- a/yasa/tests/test_sleepstats.py +++ b/yasa/tests/test_sleepstats.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/sleepstats.py file.""" + import unittest import numpy as np import pandas as pd diff --git a/yasa/tests/test_spectral.py b/yasa/tests/test_spectral.py index dc937b8..458b300 100644 --- a/yasa/tests/test_spectral.py +++ b/yasa/tests/test_spectral.py @@ -1,4 +1,5 @@ """Test the functions in the yasa/spectral.py file.""" + import mne import pytest import unittest diff --git a/yasa/tests/test_staging.py b/yasa/tests/test_staging.py index a87edd8..8a07629 100644 --- a/yasa/tests/test_staging.py +++ b/yasa/tests/test_staging.py @@ -1,4 +1,5 @@ """Test the functions in yasa/staging.py.""" + import mne import unittest import numpy as np