mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-10 19:46:22 +00:00
610a1bb313
* Fixed black hook requiring Py3.6 to installed locally. Will now assume Py3.6+ in installed. * Added isort traceback in pre-commit flake8 hook fails * Updated versions of Black, Prettier and isort * Keep Flake8 at 3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638 * New pyproject config for isort v5 with fixes for Python 2 imports. * Fixed travis config to run Python 3.6 for lint run. Replaced the virtualenv with_system_site_packages config with Travis specific Python config value so lint run doesn't attempt to append with_system_site_packages to Python 3.6 command.
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
default_language_version:
|
|
python: python3
|
|
exclude: >
|
|
(?x)^(
|
|
deluge/ui/web/docs/template/.*|
|
|
)$
|
|
repos:
|
|
- repo: https://github.com/ambv/black
|
|
rev: 20.8b1
|
|
hooks:
|
|
- id: black
|
|
name: Fmt Black
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v2.2.1
|
|
hooks:
|
|
- id: prettier
|
|
name: Fmt Prettier
|
|
# Workaround to list modified files only.
|
|
args: [--list-different]
|
|
- repo: https://gitlab.com/pycqa/flake8
|
|
# v3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638
|
|
rev: 3.7.9
|
|
hooks:
|
|
- id: flake8
|
|
name: Chk Flake8
|
|
additional_dependencies:
|
|
- flake8-isort==4.0.0
|
|
- pep8-naming==0.11.1
|
|
args: [--isort-show-traceback]
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v3.4.0
|
|
hooks:
|
|
- id: double-quote-string-fixer
|
|
name: Fix Double-quotes
|
|
- id: end-of-file-fixer
|
|
name: Fix End-of-files
|
|
exclude_types: [javascript, css]
|
|
- id: mixed-line-ending
|
|
name: Fix Line endings
|
|
args: [--fix=auto]
|
|
- id: trailing-whitespace
|
|
name: Fix Trailing whitespace
|