Skip to content

Commit ba056d7

Browse files
authored
Merge pull request #16 from taskiq-python/feature/ruff
2 parents 9ccc5e0 + dd528f6 commit ba056d7

File tree

14 files changed

+157
-812
lines changed

14 files changed

+157
-812
lines changed

.flake8

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

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
uses: knowsuchagency/poetry-install@v1
1919
env:
2020
POETRY_VIRTUALENVS_CREATE: false
21+
- name: Set verison
22+
run: poetry version "${{ github.ref_name }}"
2123
- name: Release package
2224
env:
2325
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,27 @@ name: Testing taskiq-pipelines
33
on: pull_request
44

55
jobs:
6-
black:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python
11-
uses: actions/setup-python@v2
12-
with:
13-
python-version: "3.9"
14-
- name: Install deps
15-
uses: knowsuchagency/poetry-install@v1
16-
env:
17-
POETRY_VIRTUALENVS_CREATE: false
18-
- name: Run black check
19-
run: poetry run black --check .
20-
flake8:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v2
24-
- name: Set up Python
25-
uses: actions/setup-python@v2
26-
with:
27-
python-version: "3.9"
28-
- name: Install deps
29-
uses: knowsuchagency/poetry-install@v1
30-
env:
31-
POETRY_VIRTUALENVS_CREATE: false
32-
- name: Run flake8 check
33-
run: poetry run flake8 --count .
34-
mypy:
6+
lint:
7+
strategy:
8+
matrix:
9+
cmd:
10+
- black
11+
- ruff
12+
- mypy
3513
runs-on: ubuntu-latest
3614
steps:
3715
- uses: actions/checkout@v2
16+
- name: Install poetry
17+
run: pipx install poetry
3818
- name: Set up Python
39-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
4020
with:
41-
python-version: "3.9"
21+
python-version: "3.11"
22+
cache: "poetry"
4223
- name: Install deps
43-
uses: knowsuchagency/poetry-install@v1
44-
env:
45-
POETRY_VIRTUALENVS_CREATE: false
46-
- name: Run mypy check
47-
run: poetry run mypy .
24+
run: poetry install --all-extras
25+
- name: Run lint check
26+
run: poetry run pre-commit run -a ${{ matrix.cmd }}
4827
pytest:
4928
strategy:
5029
matrix:

.pre-commit-config.yaml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,19 @@ repos:
2222
language: system
2323
types: [python]
2424

25-
- id: autoflake
26-
name: autoflake
27-
entry: poetry run autoflake
28-
language: system
29-
types: [python]
30-
args: [--in-place, --remove-all-unused-imports, --remove-duplicate-keys]
31-
32-
- id: isort
33-
name: isort
34-
entry: poetry run isort
35-
language: system
36-
types: [python]
37-
38-
- id: flake8
39-
name: Check with Flake8
40-
entry: poetry run flake8
25+
- id: ruff
26+
name: Run ruff lints
27+
entry: poetry run ruff
4128
language: system
4229
pass_filenames: false
4330
types: [python]
44-
args: [--count, taskiq_pipelines, tests]
31+
args:
32+
- "check"
33+
- "--fix"
34+
- "."
4535

4636
- id: mypy
4737
name: Validate types with MyPy
4838
entry: poetry run mypy
4939
language: system
5040
types: [python]
51-
52-
- id: yesqa
53-
name: Remove usless noqa
54-
entry: poetry run yesqa
55-
language: system
56-
types: [python]

0 commit comments

Comments
 (0)