Skip to content

Commit c7e10db

Browse files
committed
Fix linter configs
1 parent 6af8bf4 commit c7e10db

File tree

3 files changed

+20
-37
lines changed

3 files changed

+20
-37
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,14 @@ jobs:
3333
restore-keys: |
3434
pip-lint-
3535
- name: Install dependencies
36-
uses: py-actions/py-dependency-install@v2
37-
with:
38-
path: requirements.txt
39-
- name: Install itself
4036
run: |
41-
python setup.py install
37+
make install
4238
- name: Run linter
4339
run: |
4440
make lint
45-
- name: Prepare twine checker
46-
run: |
47-
pip install -U twine wheel
48-
python setup.py sdist bdist_wheel
4941
- name: Run twine checker
5042
run: |
51-
twine check dist/*
43+
make check
5244
5345
test:
5446
name: Test
@@ -81,9 +73,8 @@ jobs:
8173
restore-keys: |
8274
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-
8375
- name: Install dependencies
84-
uses: py-actions/py-dependency-install@v2
85-
with:
86-
path: requirements.txt
76+
run: |
77+
make install
8778
- name: Run unittests
8879
env:
8980
COLOR: 'yes'
@@ -109,8 +100,8 @@ jobs:
109100
- name: Setup Python
110101
uses: actions/setup-python@v2
111102
- name: Install dependencies
112-
run:
113-
python -m pip install -U pip wheel twine build
103+
run: |
104+
make install
114105
- name: Make dists
115106
run:
116107
python -m build

Makefile

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
SOURCES = setup.py async_timeout tests
2-
31
test: lint
42
pytest tests
53

6-
7-
lint: mypy check black flake8
8-
9-
10-
mypy:
4+
lint: fmt
115
mypy
126

13-
14-
black:
15-
isort -c $(SOURCES)
16-
black --check $(SOURCES)
17-
18-
flake8:
19-
flake8 $(SOURCES)
20-
21-
227
fmt:
23-
isort $(SOURCES)
24-
black $(SOURCES)
8+
ifdef CI
9+
pre-commit run --all-files --show-diff-on-failure
10+
else
11+
pre-commit run --all-files
12+
endif
2513

2614

2715
check:
28-
python setup.py check -rms
16+
python -m build
17+
twine check dist/*
18+
19+
install:
20+
pip install -U pip
21+
pip install -r requirements.txt

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
-e .
2-
black==21.11b1; implementation_name=="cpython"
2+
build==0.7.0
33
docutils==0.18.1
4-
flake8==4.0.1
5-
isort==5.10.1
64
mypy==0.910; implementation_name=="cpython"
75
pre-commit==2.16.0
86
pytest==6.2.5
97
pytest-asyncio==0.16.0
108
pytest-cov==3.0.0
9+
twine==3.7.0

0 commit comments

Comments
 (0)