Skip to content

Commit 45858d0

Browse files
committed
[ci] Return to pre 0.16 ruff behaviour
1 parent 5a38851 commit 45858d0

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

pyerrors/correlators.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,7 @@ def m_eff(self, variant='log', guess=1.0):
727727
if variant == 'log':
728728
newcontent = []
729729
for t in range(self.T - 1):
730-
if ((self.content[t] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0):
731-
newcontent.append(None)
732-
elif self.content[t][0].value / self.content[t + 1][0].value < 0:
730+
if ((self.content[t] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0) or self.content[t][0].value / self.content[t + 1][0].value < 0:
733731
newcontent.append(None)
734732
else:
735733
newcontent.append(self.content[t] / self.content[t + 1])
@@ -741,9 +739,7 @@ def m_eff(self, variant='log', guess=1.0):
741739
elif variant == 'logsym':
742740
newcontent = []
743741
for t in range(1, self.T - 1):
744-
if ((self.content[t - 1] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0):
745-
newcontent.append(None)
746-
elif self.content[t - 1][0].value / self.content[t + 1][0].value < 0:
742+
if ((self.content[t - 1] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0) or self.content[t - 1][0].value / self.content[t + 1][0].value < 0:
747743
newcontent.append(None)
748744
else:
749745
newcontent.append(self.content[t - 1] / self.content[t + 1])
@@ -872,7 +868,6 @@ def set_prange(self, prange):
872868
raise ValueError("Start and end point must define a range in the interval 0,T")
873869

874870
self.prange = prange
875-
return
876871

877872
def show(self, x_range=None, comp=None, y_range=None, logscale=False, plateau=None, fit_res=None, fit_key=None, ylabel=None, save=None, auto_gamma=False, hide_sigma=None, references=None, title=None):
878873
"""Plots the correlator using the tag of the correlator as label if available.

pyerrors/obs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ def _compute_drho(i, e_name=e_name, w_max=w_max, e_N=e_N):
364364
self.ddvalue = 0.0
365365
else:
366366
self.ddvalue = np.sqrt(self.ddvalue) / self._dvalue
367-
return
368367

369368
gm = gamma_method
370369

@@ -1303,7 +1302,7 @@ def _compute_scalefactor_missing_rep(obs):
13031302
options = {
13041303
'base_step': 0.1,
13051304
'step_ratio': 2.5}
1306-
for key in options.keys():
1305+
for key in options:
13071306
kwarg = kwargs.get(key)
13081307
if kwarg is not None:
13091308
options[key] = kwarg

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
target-version = "py310"
77

88
[tool.ruff.lint]
9-
extend-select = ["E", "W", "I", "B", "PIE", "PLE", "PLW", "UP", "NPY", "RUF"]
9+
select = ["E", "W", "I", "B", "PIE", "PLE", "PLW", "UP", "NPY", "RUF"]
1010
ignore = [
1111
"F403", # star imports in __init__ files are intentional
1212
"E501", # line too long

0 commit comments

Comments
 (0)