Skip to content

Commit 88fbe75

Browse files
committed
Better QA configuration.
1 parent 7c243a0 commit 88fbe75

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ jobs:
4949
python -m pip install --upgrade pip
5050
pip install -U tox
5151
- name: Run tox
52-
run: tox -e py38,black,coverage
52+
run: tox -e py38,black,isort,flake8,coverage
5353
env:
5454
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.2.0
5+
rev: v4.4.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/pycqa/isort
10-
rev: "5.9.3"
10+
rev: "5.12.0"
1111
hooks:
1212
- id: isort
1313
args: ["--profile", "black", "--filter-files"]
1414
- repo: https://github.com/psf/black
15-
rev: "22.3.0"
15+
rev: "23.1.0"
1616
hooks:
1717
- id: black
18-
- repo: https://gitlab.com/pycqa/flake8
19-
rev: "3.9.2"
18+
- repo: https://github.com/pycqa/flake8
19+
rev: "6.0.0"
2020
hooks:
2121
- id: flake8
2222
args: ["--max-line-length", "88", "--extend-ignore=E203"]

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ sudo apt install libmagic1 wget ffmpeg \
4545
libharfbuzz-dev libfribidi-dev libxcb1-dev gifsicle
4646
```
4747

48+
# Contribution
49+
50+
```shell
51+
pip -r requirements.txt
52+
pip install tox pre-commit
53+
pre-commit install
54+
# For tests
55+
tox
56+
```
57+
4858
# Users
4959

5060
Non-exhaustive list of scrapers using it (check status when updating API):

tox.ini

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36, py37, py38, py39, py310, py311, black, coverage
2+
envlist = py36, py37, py38, py39, py310, py311, black, isort, flake8, coverage
33

44
[testenv]
55
passenv =
@@ -15,9 +15,19 @@ commands =
1515

1616
[testenv:black]
1717
deps =
18-
black>=22.3.0,<23
18+
black>=23.1.0,<24
1919
commands = black --check .
2020

21+
[testenv:isort]
22+
deps =
23+
isort>=5.12.0,<5.13
24+
commands = isort --profile black --check src tests
25+
26+
[testenv:flake8]
27+
deps =
28+
flake8>=6.0.0,<7.0
29+
commands = flake8 src --count --max-line-length=88 --statistics --extend-ignore=E203
30+
2131
[testenv:coverage]
2232
passenv =
2333
CODECOV_TOKEN

0 commit comments

Comments
 (0)