Skip to content

Commit

Permalink
Merge pull request #16 from taskiq-python/feature/ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius authored Aug 3, 2024
2 parents 9ccc5e0 + dd528f6 commit ba056d7
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 812 deletions.
137 changes: 0 additions & 137 deletions .flake8

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Set verison
run: poetry version "${{ github.ref_name }}"
- name: Release package
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
Expand Down
51 changes: 15 additions & 36 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,27 @@ name: Testing taskiq-pipelines
on: pull_request

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run black check
run: poetry run black --check .
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run flake8 check
run: poetry run flake8 --count .
mypy:
lint:
strategy:
matrix:
cmd:
- black
- ruff
- mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
cache: "poetry"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run mypy check
run: poetry run mypy .
run: poetry install --all-extras
- name: Run lint check
run: poetry run pre-commit run -a ${{ matrix.cmd }}
pytest:
strategy:
matrix:
Expand Down
30 changes: 7 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,19 @@ repos:
language: system
types: [python]

- id: autoflake
name: autoflake
entry: poetry run autoflake
language: system
types: [python]
args: [--in-place, --remove-all-unused-imports, --remove-duplicate-keys]

- id: isort
name: isort
entry: poetry run isort
language: system
types: [python]

- id: flake8
name: Check with Flake8
entry: poetry run flake8
- id: ruff
name: Run ruff lints
entry: poetry run ruff
language: system
pass_filenames: false
types: [python]
args: [--count, taskiq_pipelines, tests]
args:
- "check"
- "--fix"
- "."

- id: mypy
name: Validate types with MyPy
entry: poetry run mypy
language: system
types: [python]

- id: yesqa
name: Remove usless noqa
entry: poetry run yesqa
language: system
types: [python]
Loading

0 comments on commit ba056d7

Please sign in to comment.