From 630541f308f269a31c09993bb02c339967a17a53 Mon Sep 17 00:00:00 2001 From: zssherman Date: Tue, 13 Feb 2024 14:06:58 -0600 Subject: [PATCH] STY: More pep8 fixes. --- act/io/hysplit.py | 2 +- act/utils/data_utils.py | 2 +- tests/plotting/test_geodisplay.py | 1 + tests/plotting/test_xsectiondisplay.py | 1 + tests/qc/test_qcfilter.py | 1 + tests/retrievals/test_sp2_retrievals.py | 1 + tests/utils/test_io_utils.py | 1 + 7 files changed, 7 insertions(+), 2 deletions(-) diff --git a/act/io/hysplit.py b/act/io/hysplit.py index 162d0ecae8..0579b3ef00 100644 --- a/act/io/hysplit.py +++ b/act/io/hysplit.py @@ -95,7 +95,7 @@ def read_hysplit(filename, base_year=2000): var_list.append(variable) input_df = pd.read_csv( - filename, sep='\s+', index_col=False, names=var_list, skiprows=12 + filename, sep=r'\s+', index_col=False, names=var_list, skiprows=12 ) # noqa W605 input_df['year'] = base_year + input_df['year'] input_df['time'] = pd.to_datetime( diff --git a/act/utils/data_utils.py b/act/utils/data_utils.py index 68688af974..d664f5a356 100644 --- a/act/utils/data_utils.py +++ b/act/utils/data_utils.py @@ -41,7 +41,7 @@ def change_units( skip_variables=None, skip_standard=True, verbose=False, - raise_error=False + raise_error=False, ): """ Parameters diff --git a/tests/plotting/test_geodisplay.py b/tests/plotting/test_geodisplay.py index 89acc820fb..a8196f1483 100644 --- a/tests/plotting/test_geodisplay.py +++ b/tests/plotting/test_geodisplay.py @@ -8,6 +8,7 @@ try: import cartopy # noqa + CARTOPY_AVAILABLE = True except ImportError: CARTOPY_AVAILABLE = False diff --git a/tests/plotting/test_xsectiondisplay.py b/tests/plotting/test_xsectiondisplay.py index 89df01ddc8..c5c17357dd 100644 --- a/tests/plotting/test_xsectiondisplay.py +++ b/tests/plotting/test_xsectiondisplay.py @@ -8,6 +8,7 @@ try: import cartopy # noqa + CARTOPY_AVAILABLE = True except ImportError: CARTOPY_AVAILABLE = False diff --git a/tests/qc/test_qcfilter.py b/tests/qc/test_qcfilter.py index 86521738e7..99311ec589 100644 --- a/tests/qc/test_qcfilter.py +++ b/tests/qc/test_qcfilter.py @@ -14,6 +14,7 @@ try: import scikit_posthocs # noqa + SCIKIT_POSTHOCS_AVAILABLE = True except ImportError: SCIKIT_POSTHOCS_AVAILABLE = False diff --git a/tests/retrievals/test_sp2_retrievals.py b/tests/retrievals/test_sp2_retrievals.py index afd809e56b..b5bf49f927 100644 --- a/tests/retrievals/test_sp2_retrievals.py +++ b/tests/retrievals/test_sp2_retrievals.py @@ -5,6 +5,7 @@ try: import pysp2 # noqa + PYSP2_AVAILABLE = True except ImportError: PYSP2_AVAILABLE = False diff --git a/tests/utils/test_io_utils.py b/tests/utils/test_io_utils.py index 526160353f..23393e6bbd 100644 --- a/tests/utils/test_io_utils.py +++ b/tests/utils/test_io_utils.py @@ -13,6 +13,7 @@ try: import moviepy.video.io.ImageSequenceClip # noqa + MOVIEPY_AVAILABLE = True except ImportError: MOVIEPY_AVAILABLE = False