Skip to content

Commit

Permalink
Ruff migration (#281)
Browse files Browse the repository at this point in the history
* Initial ruff migration

* Update github actions

* Fix a couple broken bits in the CI

* Fix MyPy errors

* Correct name of job

* Correct type of tuple to a list

* Fix broken tests caused by pathlib functioning slightly different

* Add in missed ruff fix for pytest private fixture usage

* Formatting and linting commit

* Cull pylint and format better

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
Pasarus and github-actions authored Jun 11, 2024
1 parent ca9dd5b commit 7c8f608
Show file tree
Hide file tree
Showing 25 changed files with 326 additions and 928 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
contents: read

jobs:
black:
formatting_and_linting:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
Expand All @@ -33,14 +33,22 @@ jobs:
python -m pip install --upgrade pip
python -m pip install .[formatting]
- name: Run black
- name: Run ruff formatting
run: |
black --line-length 120 .
ruff format .
- name: Run ruff linting
run: |
ruff check --fix
- name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "black auto commit" || true
git push
git commit -m "Formatting and linting commit" || true
git push
- name: Run mypy
run: |
mypy --strict rundetection
36 changes: 0 additions & 36 deletions .github/workflows/linting.yml

This file was deleted.

Loading

0 comments on commit 7c8f608

Please sign in to comment.