mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-23 11:35:19 +03:00
chg: Makefile - use ruff & pre-commit
This commit is contained in:
parent
cd69c4a0e8
commit
00c662f870
12
Makefile
12
Makefile
@ -52,6 +52,7 @@ venv-dev-python: ## Install Python 3 venv
|
|||||||
venv-dev: venv-python ## Install Python 3 dev dependencies
|
venv-dev: venv-python ## Install Python 3 dev dependencies
|
||||||
./venv-dev/bin/pip install -r dev-requirements.txt
|
./venv-dev/bin/pip install -r dev-requirements.txt
|
||||||
./venv-dev/bin/pip install -r doc-requirements.txt
|
./venv-dev/bin/pip install -r doc-requirements.txt
|
||||||
|
./venv-dev/bin/pre-commit install --hook-type pre-commit
|
||||||
|
|
||||||
venv-dev-upgrade: ## Upgrade Python 3 dev dependencies
|
venv-dev-upgrade: ## Upgrade Python 3 dev dependencies
|
||||||
./venv-dev/bin/pip install --upgrade pip
|
./venv-dev/bin/pip install --upgrade pip
|
||||||
@ -86,15 +87,10 @@ test-min-with-upgrade: venv-min-upgrade ## Upgrade deps and run unit tests in mi
|
|||||||
# ===================================================================
|
# ===================================================================
|
||||||
|
|
||||||
format: ## Format the code
|
format: ## Format the code
|
||||||
@git ls-files 'glances/*.py' | xargs ./venv-dev/bin/python -m autopep8 --in-place --jobs 0 --global-config=.flake8
|
./venv-dev/bin/python -m ruff format .
|
||||||
@git ls-files 'glances/*.py' | xargs ./venv-dev/bin/python -m autoflake --in-place --remove-all-unused-imports --remove-unused-variables --remove-duplicate-keys --exclude="compat.py,globals.py"
|
|
||||||
./venv-dev/bin/python -m black ./glances --exclude outputs/static
|
|
||||||
|
|
||||||
flake8: ## Run flake8 linter.
|
lint: ## Lint the code.
|
||||||
@git ls-files 'glances/ *.py' | xargs ./venv-dev/bin/python -m flake8 --config=.flake8
|
./venv-dev/bin/python -m ruff check . --fix
|
||||||
|
|
||||||
ruff: ## Run Ruff (fastest) linter.
|
|
||||||
./venv-dev/bin/python -m ruff check . --config=./pyproject.toml
|
|
||||||
|
|
||||||
codespell: ## Run codespell to fix common misspellings in text files
|
codespell: ## Run codespell to fix common misspellings in text files
|
||||||
./venv-dev/bin/codespell -S .git,./docs/_build,./Glances.egg-info,./venv*,./glances/outputs,*.svg -L hart,bu,te,statics
|
./venv-dev/bin/codespell -S .git,./docs/_build,./Glances.egg-info,./venv*,./glances/outputs,*.svg -L hart,bu,te,statics
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
autoflake
|
|
||||||
autopep8
|
|
||||||
black
|
|
||||||
codespell
|
codespell
|
||||||
flake8
|
|
||||||
fonttools>=4.43.0 # not directly required, pinned by Snyk to avoid a vulnerability
|
fonttools>=4.43.0 # not directly required, pinned by Snyk to avoid a vulnerability
|
||||||
gprof2dot
|
gprof2dot
|
||||||
matplotlib
|
matplotlib
|
||||||
memory-profiler
|
memory-profiler
|
||||||
numpy>=1.22.2 # not directly required, pinned by Snyk to avoid a vulnerability
|
numpy>=1.22.2 # not directly required, pinned by Snyk to avoid a vulnerability
|
||||||
pillow>=10.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
|
pillow>=10.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
|
||||||
|
pre-commit
|
||||||
py-spy
|
py-spy
|
||||||
pyright
|
pyright
|
||||||
requirements-parser
|
requirements-parser
|
||||||
|
Loading…
Reference in New Issue
Block a user