[DEV] add ruff for linting and combine linters into one workflow (#1875)
* remove unused and update black + precommit * makefile add ruff remove unused * F541 fix * complete ruff ignore * remove unused workflow and combine linters into one add lnbits/static to ruff ignore save preview and linelength for later define target version for black * ignore upgrades for mypy * remove flake8 * ignore F401 for __init__ files * unused pylint comment * unused noqa * ignore upgrades for black * run linting on py3.9 and py3.10 * dont assume python
This commit is contained in:
parent
642f9a4c00
commit
eb0b06f98c
16 changed files with 218 additions and 429 deletions
24
Makefile
24
Makefile
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
all: format check
|
||||
|
||||
format: prettier isort black
|
||||
format: prettier black ruff
|
||||
|
||||
check: mypy pyright pylint flake8 checkisort checkblack checkprettier
|
||||
check: mypy pyright checkblack checkruff checkprettier
|
||||
|
||||
prettier:
|
||||
poetry run ./node_modules/.bin/prettier --write lnbits
|
||||
|
|
@ -12,20 +12,17 @@ prettier:
|
|||
pyright:
|
||||
poetry run ./node_modules/.bin/pyright
|
||||
|
||||
black:
|
||||
poetry run black .
|
||||
|
||||
flake8:
|
||||
poetry run flake8
|
||||
|
||||
mypy:
|
||||
poetry run mypy
|
||||
|
||||
isort:
|
||||
poetry run isort .
|
||||
black:
|
||||
poetry run black .
|
||||
|
||||
pylint:
|
||||
poetry run pylint *.py lnbits/ tools/ tests/
|
||||
ruff:
|
||||
poetry run ruff check . --fix
|
||||
|
||||
checkruff:
|
||||
poetry run ruff check .
|
||||
|
||||
checkprettier:
|
||||
poetry run ./node_modules/.bin/prettier --check lnbits
|
||||
|
|
@ -33,9 +30,6 @@ checkprettier:
|
|||
checkblack:
|
||||
poetry run black --check .
|
||||
|
||||
checkisort:
|
||||
poetry run isort --check-only .
|
||||
|
||||
dev:
|
||||
poetry run lnbits --reload
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue