File tree 6 files changed +44
-14
lines changed
6 files changed +44
-14
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- black==24.3.0
2
1
click==8.0.4
3
- flake8-isort
4
- flake8
5
- flynt~=0.69.0
6
2
invoke==2.2.0
7
3
mock
8
4
packaging>=20.4
@@ -11,6 +7,7 @@ pytest-asyncio>=0.23.0,<0.24.0
11
7
pytest-cov
12
8
pytest-profiling==1.8.1
13
9
pytest-timeout
10
+ ruff==0.9.6
14
11
ujson>=4.2.0
15
12
uvloop
16
13
vulture>=2.3.0
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ pip install -r dev_requirements.txt
21
21
pip install -r doctests/requirements.txt
22
22
```
23
23
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```
26
26
locally to validate the linting, prior to CI.
27
27
28
28
Just include necessary assertions in the example file and run
Original file line number Diff line number Diff line change 15
15
from cryptography .hazmat .primitives .hashes import SHA1 , Hash
16
16
from cryptography .hazmat .primitives .serialization import Encoding , PublicFormat
17
17
from cryptography .x509 import ocsp
18
+
18
19
from redis .exceptions import AuthorizationError , ConnectionError
19
20
20
21
Original file line number Diff line number Diff line change
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" ]
Original file line number Diff line number Diff line change @@ -27,11 +27,9 @@ def build_docs(c):
27
27
@task
28
28
def linters (c ):
29
29
"""Run code linters"""
30
- run ("flake8 tests redis" )
30
+ run ("ruff check tests redis" )
31
31
run ("black --target-version py37 --check --diff tests redis" )
32
- run ("isort --check-only --diff tests redis" )
33
32
run ("vulture redis whitelist.py --min-confidence 80" )
34
- run ("flynt --fail-on-change --dry-run tests redis" )
35
33
36
34
37
35
@task
You can’t perform that action at this time.
0 commit comments