-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI and pre-commit configuration
- Loading branch information
1 parent
8dfefd3
commit 78496e3
Showing
5 changed files
with
124 additions
and
38 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,5 @@ | ||
# Configurtion file for Markdown lint. Add exceptions here. | ||
default: true | ||
|
||
# heading levels. | ||
MD002: 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 |
---|---|---|
@@ -1,30 +1,55 @@ | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
args: [--safe, --quiet] | ||
language_version: python3 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
language_version: python3 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
language_version: python3 | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint | ||
language: python | ||
language_version: python3 | ||
args: | ||
[ | ||
"-rn", # Only display messages. | ||
"-sn", # Don't display the pylint score. | ||
"--rcfile=.pylintrc" | ||
] | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-case-conflict | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
language_version: python3 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.0.270 | ||
hooks: | ||
- id: ruff | ||
args: ["--fix", "--show-fixes"] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.39.0 | ||
hooks: | ||
- id: markdownlint | ||
args: [--config=.markdownlint.yaml] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
args: ["--ignore-regex=.*noqa"] | ||
exclude: > | ||
(?x)^( | ||
.*test_main.py | ||
)$ | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint | ||
language: python | ||
language_version: python3 | ||
args: | ||
[ | ||
"-rn", # Only display messages. | ||
"-sn", # Don't display the pylint score. | ||
"--rcfile=.pylintrc" | ||
] | ||
exclude: | | ||
(?x) ( | ||
^html/ | ||
) |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. | ||
select = ["E", "F"] | ||
ignore = [ | ||
"E501", # line-length too long, set via black. | ||
] | ||
|
||
# Allow autofix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"] | ||
unfixable = [] | ||
|
||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 88 | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
# Assume Python 3.10. | ||
target-version = "py310" | ||
|
||
[mccabe] | ||
# Unlike Flake8, default to a complexity level of 10. | ||
max-complexity = 10 |
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