From c66068318ef3a9e707badf8a6dea2343e26fe1be Mon Sep 17 00:00:00 2001 From: Bart Schilperoort Date: Sat, 29 Jul 2023 09:47:54 +0200 Subject: [PATCH] Remove #pylint: disable comments. --- src/dtscalibration/calibrate_utils.py | 11 ++++------- src/dtscalibration/datastore_utils.py | 3 --- src/dtscalibration/io.py | 1 - 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/dtscalibration/calibrate_utils.py b/src/dtscalibration/calibrate_utils.py index bf29d939..7d23d064 100644 --- a/src/dtscalibration/calibrate_utils.py +++ b/src/dtscalibration/calibrate_utils.py @@ -44,7 +44,6 @@ def parse_st_var(ds, st_var, st_label='st'): return st_var_sec -# pylint: disable=too-many-arguments,too-many-locals def calibration_single_ended_solver( # noqa: MC0001 ds, st_var=None, @@ -267,18 +266,18 @@ def calibration_single_ended_solver( # noqa: MC0001 if solver == 'sparse': if calc_cov: - p_sol, p_var, p_cov = wls_sparse( # pylint: disable=unbalanced-tuple-unpacking + p_sol, p_var, p_cov = wls_sparse( X, y, w=w, x0=p0_est_dalpha, calc_cov=calc_cov, verbose=verbose) else: - p_sol, p_var = wls_sparse( # pylint: disable=unbalanced-tuple-unpacking + p_sol, p_var = wls_sparse( X, y, w=w, x0=p0_est_dalpha, calc_cov=calc_cov, verbose=verbose) elif solver == 'stats': if calc_cov: - p_sol, p_var, p_cov = wls_stats( # pylint: disable=unbalanced-tuple-unpacking + p_sol, p_var, p_cov = wls_stats( X, y, w=w, calc_cov=calc_cov, verbose=verbose) else: - p_sol, p_var = wls_stats( # pylint: disable=unbalanced-tuple-unpacking + p_sol, p_var = wls_stats( X, y, w=w, calc_cov=calc_cov, verbose=verbose) elif solver == 'external': @@ -731,7 +730,6 @@ def matching_section_location_indices(ix_sec, hix, tix): return ix_from_cal_match_to_glob -# pylint: disable=too-many-statements def construct_submatrices_matching_sections( x, ix_sec, hix, tix, nt, trans_att): """ @@ -1039,7 +1037,6 @@ def construct_submatrices(nt, nx, ds, trans_att, x_sec): return E, Z_D, Z_gamma, Zero_d, Z_TA_fw, Z_TA_bw -# pylint: disable=too-many-branches def wls_sparse( X, y, diff --git a/src/dtscalibration/datastore_utils.py b/src/dtscalibration/datastore_utils.py index f323241c..b0918e60 100644 --- a/src/dtscalibration/datastore_utils.py +++ b/src/dtscalibration/datastore_utils.py @@ -269,7 +269,6 @@ def merge_double_ended_times(ds_fw, ds_bw, verify_timedeltas=True, verbose=True) return ds_fw.isel(time=iuse_chfw2), ds_bw.isel(time=iuse_chbw2) -# pylint: disable=too-many-locals def shift_double_ended(ds, i_shift, verbose=True): """ The cable length was initially configured during the DTS measurement. For double ended @@ -303,7 +302,6 @@ def shift_double_ended(ds, i_shift, verbose=True): ds2 : DataStore oobject With a shifted x-axis """ - # pylint: disable=import-outside-toplevel from dtscalibration import DataStore assert isinstance(i_shift, (int, np.integer)) @@ -350,7 +348,6 @@ def shift_double_ended(ds, i_shift, verbose=True): return DataStore(data_vars=d2_data, coords=d2_coords, attrs=ds.attrs) -# pylint: disable=too-many-locals def suggest_cable_shift_double_ended( ds, irange, plot_result=True, **fig_kwargs): """The cable length was initially configured during the DTS measurement. diff --git a/src/dtscalibration/io.py b/src/dtscalibration/io.py index 1e453f7c..1a7130c2 100644 --- a/src/dtscalibration/io.py +++ b/src/dtscalibration/io.py @@ -237,7 +237,6 @@ def sensortran_binary_version_check(filepathlist): return version -# pylint: disable=too-many-locals def read_silixa_files_routine_v6( # noqa: MC0001 filepathlist, xml_version=6,