-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #562 from dbfixtures/pre-commit
Use pre-commit for maintaining code style and linting
- Loading branch information
Showing
16 changed files
with
89 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
### What are the results | ||
|
||
|
||
### What are the expected results | ||
### What are the expected results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Run linters | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
pre-commit: | ||
uses: fizyk/actions-reuse/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
ci: | ||
skip: [pipenv, mypy] | ||
|
||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
minimum_pre_commit_version: 4.0.0 | ||
default_stages: [pre-commit] | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: check-yaml | ||
- id: pretty-format-json | ||
- id: detect-private-key | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 25.1.0 | ||
hooks: | ||
- id: black | ||
entry: black --config pyproject.toml . | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.9.6 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix, --respect-gitignore, --show-fixes] | ||
|
||
- repo: https://github.com/rstcheck/rstcheck | ||
rev: v6.2.4 | ||
hooks: | ||
- id: rstcheck | ||
additional_dependencies: [sphinx, toml] | ||
|
||
- repo: local | ||
hooks: | ||
- id: pipenv | ||
stages: [pre-commit, manual] | ||
language: system | ||
name: Install dependencies for the local linters | ||
entry: bash -c "pip install pipenv && pipenv install --dev" | ||
types_or: | ||
- python | ||
- toml # Pipfile | ||
pass_filenames: false | ||
- id: mypy | ||
stages: [pre-commit, manual] | ||
name: mypy | ||
entry: pipenv run mypy . | ||
language: system | ||
types_or: | ||
- python | ||
- toml # Pipfile | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[rstcheck] | ||
report_level = warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Adjust workflows for actions-reuse 3 | ||
Adjust workflows for actions-reuse 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Use pre-commit for maintaining code style and linting |
Oops, something went wrong.