File tree Expand file tree Collapse file tree 7 files changed +46
-13
lines changed Expand file tree Collapse file tree 7 files changed +46
-13
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11build
22black==24.3.0
33click==8.0.4
4- flake8-isort
5- flake8
6- flynt~=0.69.0
74invoke==2.2.0
85mock
96packaging>=20.4
@@ -12,6 +9,7 @@ pytest-asyncio>=0.23.0,<0.24.0
129pytest-cov
1310pytest-profiling==1.8.1
1411pytest-timeout
12+ ruff==0.9.6
1513ujson>=4.2.0
1614uvloop
1715vulture>=2.3.0
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ pip install -r dev_requirements.txt
2121pip install -r doctests/requirements.txt
2222```
2323
24- Note - the CI process, runs the basic ``` black ``` and ``` isort ``` linters against the examples. Assuming
25- the requirements above have been installed you can run ``` black yourfile.py``` and ``` isort yourfile.py```
24+ Note - the CI process, runs linters against the examples. Assuming
25+ the requirements above have been installed you can run ``` ruff check yourfile.py``` and ``` ruff format yourfile.py```
2626locally to validate the linting, prior to CI.
2727
2828Just include necessary assertions in the example file and run
Original file line number Diff line number Diff line change 22from datetime import datetime , timezone
33
44import jwt
5+
56from redis .auth .err import InvalidTokenSchemaErr
67
78
Original file line number Diff line number Diff line change 1515from cryptography .hazmat .primitives .hashes import SHA1 , Hash
1616from cryptography .hazmat .primitives .serialization import Encoding , PublicFormat
1717from cryptography .x509 import ocsp
18+
1819from redis .exceptions import AuthorizationError , ConnectionError
1920
2021
Original file line number Diff line number Diff line change 1+ target-version = " py38"
2+ line-length = 88
3+ exclude = [
4+ " *.egg-info" ,
5+ " *.pyc" ,
6+ " .git" ,
7+ " .venv*" ,
8+ " .venv*" ,
9+ " build" ,
10+ " dist" ,
11+ " docker" ,
12+ " docs/*" ,
13+ " doctests/*" ,
14+ " tasks.py" ,
15+ " venv*" ,
16+ " whitelist.py" ,
17+ ]
18+ [lint ]
19+ ignore = [
20+ " E501" ,
21+ " E741" ,
22+ " F405" ,
23+ " N801" ,
24+ " N802" ,
25+ " N803" ,
26+ " N806" ,
27+ " N815" ,
28+ " N818" ,
29+ ]
30+ extend-select = [
31+ " E" ,
32+ " F" ,
33+ " FLY" ,
34+ " I" ,
35+ " N" ,
36+ " W" ,
37+ ]
38+ [lint .per-file-ignores ]
39+ "redis/commands/search/indexDefinition.py" = [" N999" ]
40+ "tests/*" = [" I" ]
Original file line number Diff line number Diff line change @@ -27,11 +27,9 @@ def build_docs(c):
2727@task
2828def 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
You can’t perform that action at this time.
0 commit comments