Skip to content

Commit 1c55580

Browse files
committed
Replace flake8 + isort + flynt with ruff
1 parent 17db62e commit 1c55580

File tree

5 files changed

+42
-13
lines changed

5 files changed

+42
-13
lines changed

.isort.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

dev_requirements.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
black==24.3.0
21
click==8.0.4
3-
flake8-isort
4-
flake8
5-
flynt~=0.69.0
62
invoke==2.2.0
73
mock
84
packaging>=20.4
@@ -11,8 +7,8 @@ pytest-asyncio>=0.23.0,<0.24.0
117
pytest-cov
128
pytest-profiling
139
pytest-timeout
10+
ruff==0.6.9
1411
ujson>=4.2.0
1512
uvloop
1613
vulture>=2.3.0
1714
wheel>=0.30.0
18-
numpy>=1.24.0

redis/ocsp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from cryptography.hazmat.primitives.hashes import SHA1, Hash
1616
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
1717
from cryptography.x509 import ocsp
18+
1819
from redis.exceptions import AuthorizationError, ConnectionError
1920

2021

ruff.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
line-length = 88
2+
exclude = [
3+
"*.egg-info",
4+
"*.pyc",
5+
".git",
6+
".venv*",
7+
".venv*",
8+
"build",
9+
"dist",
10+
"docker",
11+
"docs/*",
12+
"doctests/*",
13+
"tasks.py",
14+
"venv*",
15+
"whitelist.py",
16+
]
17+
[lint]
18+
ignore = [
19+
"E501",
20+
"E741",
21+
"F405",
22+
"N801",
23+
"N802",
24+
"N803",
25+
"N806",
26+
"N815",
27+
"N818",
28+
]
29+
extend-select = [
30+
"E",
31+
"F",
32+
"FLY",
33+
"I",
34+
"N",
35+
"W",
36+
]
37+
[lint.per-file-ignores]
38+
"redis/commands/search/indexDefinition.py" = ["N999"]
39+
"tests/*" = ["I"]

tasks.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ def build_docs(c):
2727
@task
2828
def linters(c):
2929
"""Run code linters"""
30-
run("flake8 tests redis")
30+
run("ruff check tests redis")
3131
run("black --target-version py37 --check --diff tests redis")
32-
run("isort --check-only --diff tests redis")
3332
run("vulture redis whitelist.py --min-confidence 80")
34-
run("flynt --fail-on-change --dry-run tests redis")
3533

3634

3735
@task

0 commit comments

Comments
 (0)