Skip to content

Commit

Permalink
Remove #pylint: disable comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Jul 29, 2023
1 parent b4fbf52 commit c660683
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
11 changes: 4 additions & 7 deletions src/dtscalibration/calibrate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions src/dtscalibration/datastore_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion src/dtscalibration/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c660683

Please sign in to comment.