[ci] Return to pre 0.16 ruff behaviour

This commit is contained in:
Fabian Joswig 2026-07-27 21:32:46 +02:00
commit 45858d0244
3 changed files with 4 additions and 10 deletions

View file

@ -727,9 +727,7 @@ class Corr:
if variant == 'log': if variant == 'log':
newcontent = [] newcontent = []
for t in range(self.T - 1): for t in range(self.T - 1):
if ((self.content[t] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0): 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:
newcontent.append(None)
elif self.content[t][0].value / self.content[t + 1][0].value < 0:
newcontent.append(None) newcontent.append(None)
else: else:
newcontent.append(self.content[t] / self.content[t + 1]) newcontent.append(self.content[t] / self.content[t + 1])
@ -741,9 +739,7 @@ class Corr:
elif variant == 'logsym': elif variant == 'logsym':
newcontent = [] newcontent = []
for t in range(1, self.T - 1): for t in range(1, self.T - 1):
if ((self.content[t - 1] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0): 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:
newcontent.append(None)
elif self.content[t - 1][0].value / self.content[t + 1][0].value < 0:
newcontent.append(None) newcontent.append(None)
else: else:
newcontent.append(self.content[t - 1] / self.content[t + 1]) newcontent.append(self.content[t - 1] / self.content[t + 1])
@ -872,7 +868,6 @@ class Corr:
raise ValueError("Start and end point must define a range in the interval 0,T") raise ValueError("Start and end point must define a range in the interval 0,T")
self.prange = prange self.prange = prange
return
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): 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):
"""Plots the correlator using the tag of the correlator as label if available. """Plots the correlator using the tag of the correlator as label if available.

View file

@ -364,7 +364,6 @@ class Obs:
self.ddvalue = 0.0 self.ddvalue = 0.0
else: else:
self.ddvalue = np.sqrt(self.ddvalue) / self._dvalue self.ddvalue = np.sqrt(self.ddvalue) / self._dvalue
return
gm = gamma_method gm = gamma_method
@ -1303,7 +1302,7 @@ def derived_observable(func, data, array_mode=False, **kwargs):
options = { options = {
'base_step': 0.1, 'base_step': 0.1,
'step_ratio': 2.5} 'step_ratio': 2.5}
for key in options.keys(): for key in options:
kwarg = kwargs.get(key) kwarg = kwargs.get(key)
if kwarg is not None: if kwarg is not None:
options[key] = kwarg options[key] = kwarg

View file

@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
target-version = "py310" target-version = "py310"
[tool.ruff.lint] [tool.ruff.lint]
extend-select = ["E", "W", "I", "B", "PIE", "PLE", "PLW", "UP", "NPY", "RUF"] select = ["E", "W", "I", "B", "PIE", "PLE", "PLW", "UP", "NPY", "RUF"]
ignore = [ ignore = [
"F403", # star imports in __init__ files are intentional "F403", # star imports in __init__ files are intentional
"E501", # line too long "E501", # line too long