2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

CI updates (#6167)

* replaced flake8 with ruff
mostly for speed improvements

* fix codespell error

* move config section

* added isort again

* move djlint config to pyproject

* moved ruff section

* remove flake8 from code base

* remove flake8 from code base

* fix djlint syntax

* fix removed sections

* fix requirements file

* fix getattr useage

* auto fixed docstring

* adapted ruff settings to better fit code base

* reorder order of operations

* adjust checks

* disable autofix/format

* fixed reqs

* remove flake8 section from setup.cfg

* moved isort config

* added missing toml req

* fixed req

* fixed source path
This commit is contained in:
Matthias Mair
2024-01-10 14:16:13 +01:00
committed by GitHub
parent 73cc39bb68
commit e1b670ba57
17 changed files with 123 additions and 130 deletions

View File

@ -4,7 +4,8 @@ exclude: |
(?x)^(
InvenTree/InvenTree/static/.*|
InvenTree/locale/.*|
src/frontend/src/locales/.*
src/frontend/src/locales/.*|
.*/migrations/.*
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
@ -14,23 +15,20 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: mixed-line-ending
- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear',
'flake8-comprehensions',
'flake8-docstrings',
'flake8-string-format',
'flake8-tidy-imports',
'pep8-naming',
'flake8-logging'
]
- repo: https://github.com/pycqa/isort
rev: '5.12.0'
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
hooks:
# - id: ruff-format
# args: [--preview]
- id: ruff
args: [
#--fix,
--preview
]
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
hooks: