Skip to content

Commit

Permalink
Add ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
notarious2 committed Mar 3, 2024
1 parent 6cda453 commit 6b035c6
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 189 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint and Tests

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
poetry env use "3.11"
poetry export --only lint --output lint-requirements.txt
pip install -r lint-requirements.txt
- name: Run Ruff
run: ruff check --output-format=github .
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ repos:
hooks:
- id: flake8
exclude: "src/tests/"
additional_dependencies: [Flake8-pyproject]
additional_dependencies: [Flake8-pyproject]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.0
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
221 changes: 51 additions & 170 deletions poetry.lock

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

Loading

0 comments on commit 6b035c6

Please sign in to comment.