Skip to content

Commit 9bb5bca

Browse files
committed
Replace dead pytest-flake8 with pytest-ruff
1 parent 23c3251 commit 9bb5bca

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

examples/jobs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
from functools import lru_cache
33

44
from modello import InstanceDummy, Modello
5-
from sympy import Eq, Function, Heaviside, Piecewise, Rational, S, Symbol, oo, solve
5+
from sympy import Function, Heaviside, Piecewise, Rational, S, Symbol, oo
66

77
YEAR = 2023
88

99

1010
def generate_piecewise_income_tax(year=YEAR):
1111
"""Assuming band A."""
1212
# 2019-2020 UK tax brackets
13-
# XXX: this omits the income limit for personal allowance. A fix for this could be to add an additional
13+
# XXX: this omits the income limit for personal allowance. A fix for this could be to add a
1414
# bracket from £100,000 to £125,000 (for 2019)
1515
year_band_brackets = {
1616
2018: (
@@ -173,6 +173,7 @@ def generate_piecewise_function(brackets):
173173
>>> g(1234)
174174
0
175175
>>> x = Symbol("x")
176+
>>> from sympy import solve, Eq
176177
>>> solve(Eq(f(x), 1))
177178
[20]
178179
"""

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tool.ruff]
2+
line-length = 120
3+
target-version = "py311"

setup.cfg

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ addopts =
66
--doctest-modules --doctest-report=udiff
77
--cov=modello --cov-report=html --cov-report=term
88
--mypy
9-
--flake8
9+
--ruff
1010
python_files =
1111
test_modello.py
1212
examples/*.py
@@ -29,15 +29,6 @@ disallow_untyped_defs = True
2929
disallow_incomplete_defs = True
3030
disallow_untyped_decorators = True
3131

32-
[flake8]
33-
doctests = True
34-
max-complexity = 8
35-
max-line-length = 120
36-
ignore =
37-
D202 # can remove after https://github.com/PyCQA/pydocstyle/pull/395
38-
WS03
39-
select = WS04
40-
4132
[isort]
4233
# Import Style
4334
line_length = 120

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"flake8-docstrings",
1616
"flake8-isort",
1717
"pytest-cov>=2.6.1",
18-
"pytest-flake8",
18+
"pytest-ruff",
1919
"pytest-mypy",
2020
"pytest-pudb",
2121
"pytest>=4.1",

0 commit comments

Comments
 (0)