mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-01-05 17:52:59 +01:00
.pre-commit-config.yaml: add mypy, black & pylint
This commit is contained in:
parent
ca2956b678
commit
a34ff238bf
@ -1,6 +1,6 @@
|
|||||||
ci:
|
ci:
|
||||||
# Attempts to use networking and fails at name resolution
|
# Attempts to use networking and fails at name resolution, local hook
|
||||||
skip: [bundler-audit]
|
skip: [bundler-audit, pylint]
|
||||||
# Forĝejo/Gitea mirrors will autoclose pull requests. This should decrease
|
# Forĝejo/Gitea mirrors will autoclose pull requests. This should decrease
|
||||||
# the frequency of unnecessary PRs.
|
# the frequency of unnecessary PRs.
|
||||||
# https://github.com/pre-commit-ci/issues/issues/83
|
# https://github.com/pre-commit-ci/issues/issues/83
|
||||||
@ -33,6 +33,12 @@ repos:
|
|||||||
# https://github.com/Mikaela/gist/blob/master/doctoc.txt
|
# https://github.com/Mikaela/gist/blob/master/doctoc.txt
|
||||||
args: [--update-only, --notitle]
|
args: [--update-only, --notitle]
|
||||||
|
|
||||||
|
# Python type checking
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
rev: "v1.3.0"
|
||||||
|
hooks:
|
||||||
|
- id: mypy
|
||||||
|
|
||||||
# GitHub Actions etc. configuration validity checking
|
# GitHub Actions etc. configuration validity checking
|
||||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||||
rev: 0.23.0
|
rev: 0.23.0
|
||||||
@ -62,6 +68,12 @@ repos:
|
|||||||
rev: "v3.0.0-alpha.9-for-vscode"
|
rev: "v3.0.0-alpha.9-for-vscode"
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
|
exclude_types: [python, pyi, jupyter]
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 23.3.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
#- id: black-jupyter
|
||||||
|
|
||||||
# .editorconfig validity checking
|
# .editorconfig validity checking
|
||||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||||
@ -71,3 +83,12 @@ repos:
|
|||||||
alias: ec
|
alias: ec
|
||||||
# I don't actually care about line lengths as more than a guideline
|
# I don't actually care about line lengths as more than a guideline
|
||||||
args: [-disable-max-line-length]
|
args: [-disable-max-line-length]
|
||||||
|
|
||||||
|
# Python linter
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: pylint
|
||||||
|
name: pylint
|
||||||
|
entry: pylint
|
||||||
|
language: system
|
||||||
|
types_or: [python, pyi]
|
||||||
|
Loading…
Reference in New Issue
Block a user