From 8131bfc3f6f16db173ce9391b91c7644e0234304 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Sun, 23 Jun 2019 23:44:20 -0700 Subject: [PATCH] Install Black and isort autoformatters (#3069) * Install Black and isort * Add config via pyproject.toml Notably we keep the convention of 130 line length. * Add target python version --- pyproject.toml | 11 +++++++++++ requirements-tests-py3.txt | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..3ae4966f6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[tool.black] +line_length = 130 +target_version = ["py37"] + +[tool.isort] +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true +combine_as_imports = true +line_length = 130 diff --git a/requirements-tests-py3.txt b/requirements-tests-py3.txt index 5c23efe5e..00054fa19 100644 --- a/requirements-tests-py3.txt +++ b/requirements-tests-py3.txt @@ -1,6 +1,8 @@ git+https://github.com/python/mypy.git@master typed-ast>=1.0.4 +black==19.3b0 flake8==3.6.0 flake8-bugbear==18.8.0 flake8-pyi==18.3.1 +isort==4.3.20 pytype>=2019.5.15