76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
default_language_version:
|
|
python: python3.10
|
|
exclude: ^(src/octoprint/vendor/|src/octoprint/static/js/lib|src/octoprint/static/vendor|tests/static/js/lib|tests/util/_files|scripts/|translations/|.*\.css|.*\.svg)
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
- id: check-case-conflict
|
|
- id: check-json
|
|
- id: check-yaml
|
|
- id: check-toml
|
|
- id: check-merge-conflict
|
|
- id: fix-encoding-pragma
|
|
args: ["--remove"]
|
|
exclude: "setup.py|versioneer.py|src/octoprint_setuptools/__init__.py"
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
rev: v3.3.1
|
|
hooks:
|
|
- id: pyupgrade
|
|
args: ["--py37-plus"]
|
|
exclude: "setup.py|versioneer.py|src/octoprint_setuptools/__init__.py"
|
|
- repo: https://github.com/OctoPrint/codemods
|
|
rev: "0.6.3"
|
|
hooks:
|
|
- id: codemod_batch
|
|
args:
|
|
[
|
|
"--check",
|
|
"not_in",
|
|
"--check",
|
|
"detect_past_builtins_imports",
|
|
"--ignore",
|
|
"src/octoprint/vendor",
|
|
"--ignore",
|
|
"setup.py",
|
|
"--ignore",
|
|
"versioneer.py",
|
|
"--ignore",
|
|
"src/octoprint_setuptools/__init__.py"
|
|
]
|
|
- repo: https://github.com/pre-commit/mirrors-isort
|
|
rev: v5.10.1
|
|
hooks:
|
|
- id: isort
|
|
- repo: https://github.com/psf/black
|
|
rev: 23.1.0
|
|
hooks:
|
|
- id: black
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: 6.0.0
|
|
hooks:
|
|
- id: flake8
|
|
args: [--config=setup.cfg]
|
|
additional_dependencies:
|
|
- flake8-bugbear==23.2.13
|
|
exclude: ^(docs/)
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v2.7.1
|
|
hooks:
|
|
- id: prettier
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
rev: v8.34.0
|
|
hooks:
|
|
- id: eslint
|
|
additional_dependencies:
|
|
- eslint@7.19.0
|
|
files: \.js$
|
|
exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/)
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.2.2
|
|
hooks:
|
|
- id: codespell
|
|
exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|tests/playwright|scripts/)
|