summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-04-10 12:48:08 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2022-04-10 12:48:08 +0200
commitb22babd410bd623a7812301ba733a94dcaf90c40 (patch)
treed6b42527d96cc82d3d08f643ade90ad043133bc1 /Makefile
parent48a036cb829294ee508bed6428ab927042e5d5fb (diff)
downloadpsutil-b22babd410bd623a7812301ba733a94dcaf90c40.tar.gz
add autoflake automation tool to remove unused modules & variable
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 16c7bb26..a0a70739 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ TSCRIPT = psutil/tests/runner.py
# Internal.
DEPS = \
argparse \
+ autoflake \
autopep8 \
check-manifest \
concurrencytest \
@@ -208,7 +209,8 @@ lint: ## Run all linters
# ===================================================================
fix-flake8: ## Run autopep8, fix some Python flake8 / pep8 issues.
- @git ls-files | grep \\.py$ | xargs $(PYTHON) -m autopep8 --in-place --jobs 0 --global-config=.flake8
+ git ls-files | grep \\.py$ | xargs $(PYTHON) -m autopep8 --in-place --jobs 0 --global-config=.flake8
+ git ls-files | grep \\.py$ | xargs $(PYTHON) -m autoflake --in-place --remove-all-unused-imports --remove-unused-variables
fix-imports: ## Fix imports with isort.
@git ls-files '*.py' | xargs $(PYTHON) -m isort --settings=.isort.cfg