From a0640f5b3846d9c15adf4307b3e6d4cb27427838 Mon Sep 17 00:00:00 2001 From: Michal Date: Wed, 15 Apr 2020 17:48:16 +0200 Subject: [PATCH] create autoflake.md initial --- pages.pl/common/autoflake.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages.pl/common/autoflake.md diff --git a/pages.pl/common/autoflake.md b/pages.pl/common/autoflake.md new file mode 100644 index 000000000..29c72f44d --- /dev/null +++ b/pages.pl/common/autoflake.md @@ -0,0 +1,20 @@ +# autoflake + +> A tool to remove unused imports and variables from Python code. +> More information: . + +- Remove unused variables from a single file and display the diff: + +`autoflake --remove-unused-variables {{file.py}}` + +- Remove unused imports from multiple files and display the diffs: + +`autoflake --remove-all-unused-imports {{file1.py}} {{file2.py}} {{file3.py}}` + +- Remove unused variables from a file, overwriting the file: + +`autoflake --remove-unused-variables --in-place {{file.py}}` + +- Remove unused variables recursively from all files in a directory, overwriting each file: + +`autoflake --remove-unused-variables --in-place --recursive {{path/to/directory}}`