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

feat: remove flake8 in favor of ruff #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
21 changes: 5 additions & 16 deletions .github/workflows/code-quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,16 @@ on:
pull_request:

env:
FLAKE8_VERSION: 6.0.0
RUFF_VERSION: 0.0.287
BLACK_VERSION: 23.3.0

jobs:
format:
name: Format and Lint Check
name: Format and Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
id: setup
uses: actions/setup-python@v4
- uses: psf/black@stable
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '.github/workflows/requirements.cqc.txt'
- name: Install dependencies
run: pip install -r .github/workflows/requirements.cqc.txt
- name: Black Format Check
run: python -m black --check acapy_plugin_pickup tests int/tests
- name: Lint with flake8
run: |
python -m flake8 . --exclude=env --count --select=E9,F63,F7,F82 --show-source --statistics
python -m flake8 . --exclude=env --count --exit-zero --max-complexity=10 --max-line-length=90 --statistics
src: "./acapy_plugin_pickup"
- uses: chartboost/ruff-action@v1
2 changes: 0 additions & 2 deletions .github/workflows/requirements.cqc.txt

This file was deleted.

7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ repos:
hooks:
- id: black
stages: [commit]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.287
hooks:
- id: flake8
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]
91 changes: 34 additions & 57 deletions int/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion int/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,24 @@ acapy-client = {git = "https://github.com/Indicio-tech/acapy-client.git", rev =

[tool.poetry.dev-dependencies]
black = "^23.7.0"
flake8 = "^6.0.0"
ruff = "^0.0.287"

[build-system]
requires = ["poetry-core>=1.1.5"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
select = ["E", "F", "C", "D"]

ignore = [
# Google Python Doc Style
"D203", "D204", "D213", "D215", "D400", "D401", "D404", "D406", "D407",
"D408", "D409", "D413",
"D202", # Allow blank line after docstring
"D104", # Don't require docstring in public package
]

line-length = 90

[tool.ruff.per-file-ignores]
"**/{tests}/*" = ["F841", "D", "E501"]
Loading
Loading