feat: добавлены файлы конфигурации линтеров и GitHub Actions для проверки кода
Some checks failed
Lint project / lint (push) Failing after 2m23s
Some checks failed
Lint project / lint (push) Failing after 2m23s
- Создан файл `.gitea/workflows/lint.yaml` для настройки проверок в Gitea. - Добавлен файл `.pre-commit-config.yaml` с конфигурацией pre-commit hooks. - Создан файл `.github/workflows/lint.yaml` для линтинга кода при push в GitHub.
This commit is contained in:
51
.pre-commit-config.yaml
Normal file
51
.pre-commit-config.yaml
Normal file
@ -0,0 +1,51 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: check-yaml
|
||||
- id: check-case-conflict
|
||||
- id: check-merge-conflict
|
||||
- id: end-of-file-fixer
|
||||
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.13.2
|
||||
hooks:
|
||||
- id: isort
|
||||
exclude: __init__.py
|
||||
args: [ --profile, black, --filter-files ]
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.19.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [ --py312-plus ]
|
||||
|
||||
- repo: https://github.com/hhatto/autopep8
|
||||
rev: v2.3.1
|
||||
hooks:
|
||||
- id: autopep8
|
||||
args: [ --max-line-length=120, --in-place ]
|
||||
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 7.1.1
|
||||
hooks:
|
||||
- id: flake8
|
||||
exclude: "__init__.py"
|
||||
# args: [ "--ignore=E501,F821,W503", "--max-line-length=120" ]
|
||||
args: [ "--ignore=E501,W503", "--max-line-length=120" ]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.10.0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.12
|
||||
args: [ --line-length=120 ]
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.7.4
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [ "--fix", "--line-length=120" ]
|
||||
- id: ruff-format
|
||||
args: [ "--line-length=120" ]
|
Reference in New Issue
Block a user