From 8b943a903ac6aa3e406529723995bb18947166b5 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 8 Aug 2021 13:07:59 +0200 Subject: [PATCH] Add formatting --- .vscode/settings.json | 7 +++++++ format.sh | 15 +++++++++++++++ setup.cfg | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 .vscode/settings.json create mode 100755 format.sh create mode 100644 setup.cfg diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2685098 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.linting.enabled": true, + "python.linting.pylintPath": "pylint", + "editor.formatOnSave": true, + "python.formatting.provider": "yapf", + "python.linting.pylintEnabled": true, +} diff --git a/format.sh b/format.sh new file mode 100755 index 0000000..8df98ce --- /dev/null +++ b/format.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +yapf \ + --recursive \ + --in-place \ + --parallel \ + . +autoflake \ + --recursive \ + --in-place \ + --remove-unused-variables \ + --remove-all-unused-imports \ + --expand-star-imports \ + --remove-duplicate-keys \ + . diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..d62de91 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[yapf] +BASED_ON_STYLE = google +COLUMN_LIMIT = 150