Skip to content

Commit

Permalink
Merge pull request #12 from lysnikolaou/add-pre-commit-autofix
Browse files Browse the repository at this point in the history
Add pre-commit config and autofix CI
  • Loading branch information
andfoy authored Nov 6, 2024
2 parents e313fcc + 95fa574 commit 7dc436e
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run pre-commit and autofix

on:
pull_request:
branches:
- main

jobs:
pre-commit:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: 3.12

- uses: pre-commit/action@v3.0.1

- uses: pre-commit-ci/lite-action@v1.1.0
if: always()
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,3 @@ target/

# pyenv
.python-version

17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.4
hooks:
- id: rstcheck
additional_dependencies: ["sphinx"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ All notable changes to this project will be documented in this file.

- Install 3.13 from deadsnakes

<!-- generated by git-cliff -->
<!-- generated by git-cliff -->
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ run-parallel = "pytest_run_parallel.plugin"

[dependency-groups]
dev = [
"pre-commit>=3.5.0",
"pytest-cov>=5.0.0",
"pytest-order>=1.3.0",
"ruff>=0.7.2",
"tox>=4.23.2",
]

[tool.ruff]
Expand Down Expand Up @@ -83,6 +85,6 @@ commands = [["ruff", "check"]]
"3.10" = ["py310"]
"3.11" = ["py311"]
"3.12" = ["py312"]
"3.13" = ["py313", "ruff"]
"3.13" = ["py313"]
"3.13t" = ["py313t"]
"pypy-3.8" = ["pypy3"]
210 changes: 210 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit 7dc436e

Please sign in to comment.