Skip to content

Commit

Permalink
chore: enable ruff --preview mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Nov 3, 2023
1 parent 8a7cfb7 commit 0696d7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ target-version = ['py39', 'py310', 'py311']
exclude='\.eggs|\.git|\.mypy_cache|build|dist|\.pytest_cache|\.pytype'

[tool.ruff]
preview = true
target-version = "py38"
line-length = 88
select = [
Expand All @@ -98,13 +99,15 @@ select = [
"W", # flake8
]
ignore = [
"E203", # whitespace-before-punctuation
"E402", # module-import-not-at-top-of-file
"I001", # unsorted-imports
"N806", # non-lowercase-variable-in-function
"N803", # non-lowercase-argument
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR6301", # no-self-use
"PLR2004", # magic-value-comparison
"S101", # assert
"S102", # exec-builtin
Expand Down
4 changes: 2 additions & 2 deletions tests/test_diff_caputo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_caputo_lmethods(
from pycaputo.differentiation import make_method_from_name
from pycaputo.grid import make_points_from_name

if name in ("CaputoL2Method", "CaputoL2CMethod"):
if name in {"CaputoL2Method", "CaputoL2CMethod"}:
alpha += 1

from pycaputo.utils import EOCRecorder, savefig
Expand Down Expand Up @@ -303,7 +303,7 @@ def test_caputo_vs_differint(

from pycaputo.differentiation import CaputoDerivativeMethod, make_method_from_name

if name in ("CaputoL2Method", "CaputoL2CMethod"):
if name in {"CaputoL2Method", "CaputoL2CMethod"}:
alpha += 1

meth = make_method_from_name(name, alpha)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_diff_riemann_liouville.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_riemann_liouville_lmethods(
from pycaputo.differentiation import make_method_from_name
from pycaputo.grid import make_points_from_name

if name in ("RiemannLiouvilleL2Method", "RiemannLiouvilleL2CMethod"):
if name in {"RiemannLiouvilleL2Method", "RiemannLiouvilleL2CMethod"}:
alpha += 1

from pycaputo.utils import EOCRecorder, savefig
Expand Down

0 comments on commit 0696d7e

Please sign in to comment.