mirror of
https://github.com/fjosw/pyerrors.git
synced 2026-08-04 11:31:21 +02:00
[ci] Fix ruff 0.16 regression (#289)
* [ci] Add free threaded python interpreter 3.14t to pytest action * [ci] Return to pre 0.16 ruff behaviour * [ci] Add back ruff pyflake checks and allow 3.14t to fail * [ci] undo pytest change, bump ruff runner version * [ci] Explicitly bump ruff action version
This commit is contained in:
parent
c58467aa11
commit
8a39a951d1
4 changed files with 5 additions and 11 deletions
2
.github/workflows/ruff.yml
vendored
2
.github/workflows/ruff.yml
vendored
|
|
@ -10,6 +10,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: astral-sh/ruff-action@v3
|
||||
- uses: astral-sh/ruff-action@v4.1.0
|
||||
with:
|
||||
src: "./pyerrors"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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", "F"]
|
||||
ignore = [
|
||||
"F403", # star imports in __init__ files are intentional
|
||||
"E501", # line too long
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue