Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced flake with ruff. #16

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading