-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add pre-commit * chore: run pre-commit * chore: add pre-commit gh action to ci
- Loading branch information
Showing
85 changed files
with
631 additions
and
556 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Pre-commit | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run pre-commit | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files |
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 |
---|---|---|
|
@@ -17,4 +17,3 @@ jobs: | |
with: | ||
name: DocumentationHTML | ||
path: docs/_build | ||
|
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,67 @@ | ||
repos: | ||
|
||
# Pip Audit | ||
- repo: https://github.com/pypa/pip-audit | ||
rev: v2.7.3 | ||
hooks: | ||
- id: pip-audit | ||
name: pip-audit | ||
description: "Audits Python environments and dependency trees for known vulnerabilities" | ||
entry: pip-audit | ||
pass_filenames: false | ||
language: python | ||
|
||
# Generic | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
name: fix end of files | ||
description: "Ensures that a file is either empty, or ends with one newline" | ||
entry: end-of-file-fixer | ||
types: [ text ] | ||
stages: [ commit, push, manual ] | ||
language: python | ||
|
||
- id: trailing-whitespace | ||
name: trim trailing whitespace | ||
description: "Trims trailing whitespace" | ||
entry: trailing-whitespace-fixer | ||
types: [ text ] | ||
stages: [ commit ] | ||
language: python | ||
|
||
# TOML | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-toml | ||
name: check toml | ||
description: "Checks .toml files for parseable syntax" | ||
entry: check-toml | ||
types: [toml] | ||
language: python | ||
|
||
# YAML | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-yaml | ||
name: check yaml | ||
description: "Checks .yaml files for parseable syntax" | ||
entry: check-yaml | ||
types: [ yaml ] | ||
language: python | ||
|
||
# YAPF | ||
- repo: https://github.com/google/yapf | ||
rev: v0.40.2 | ||
hooks: | ||
- id: yapf | ||
name: yapf | ||
description: "A formatter for Python files" | ||
entry: yapf | ||
args: [ -i ] # inplace | ||
language: python | ||
types: [ python ] | ||
additional_dependencies: [ toml ] |
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
"eeyore.yapf", | ||
"streetsidesoftware.code-spell-checker", | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
"docs/*" | ||
], | ||
"esbonio.sphinx.confDir": "${workspaceFolder}/docs/source" | ||
} | ||
} |
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 +0,0 @@ | ||
|
||
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
Oops, something went wrong.