diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index a8d2361e..b9a4f440 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -727,9 +727,7 @@ class Corr: if variant == 'log': newcontent = [] 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): - newcontent.append(None) - elif self.content[t][0].value / 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) else: newcontent.append(self.content[t] / self.content[t + 1]) @@ -741,9 +739,7 @@ class Corr: elif variant == 'logsym': newcontent = [] 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): - newcontent.append(None) - elif self.content[t - 1][0].value / 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) else: 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") 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): """Plots the correlator using the tag of the correlator as label if available. diff --git a/pyerrors/obs.py b/pyerrors/obs.py index 69a05bdf..8e6fc757 100644 --- a/pyerrors/obs.py +++ b/pyerrors/obs.py @@ -364,7 +364,6 @@ class Obs: self.ddvalue = 0.0 else: self.ddvalue = np.sqrt(self.ddvalue) / self._dvalue - return gm = gamma_method @@ -1303,7 +1302,7 @@ def derived_observable(func, data, array_mode=False, **kwargs): options = { 'base_step': 0.1, 'step_ratio': 2.5} - for key in options.keys(): + for key in options: kwarg = kwargs.get(key) if kwarg is not None: options[key] = kwarg diff --git a/pyproject.toml b/pyproject.toml index a78c2bc0..26a56cb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" target-version = "py310" [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 = [ "F403", # star imports in __init__ files are intentional "E501", # line too long