From c6d77fe201a5c9af012d85d02c53fa356213b141 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Sun, 16 Jun 2019 09:43:37 -0700 Subject: [PATCH 1/3] Install Black and isort --- requirements-tests-py3.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements-tests-py3.txt b/requirements-tests-py3.txt index 5c23efe5e6b3..00054fa1974a 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 From af6bf22c1447404083f2483026eb6c63873f8d72 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Mon, 17 Jun 2019 12:28:55 -0700 Subject: [PATCH 2/3] Add config via pyproject.toml Notably we keep the convention of 130 line length. --- pyproject.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000000..342dbf3985e3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[tool.black] +line_length = 130 + +[tool.isort] +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true +combine_as_imports = true +line_length = 130 From d34c9f0d9c0c1eb7142d53e6a068d8f0d4083e61 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Mon, 17 Jun 2019 13:58:13 -0700 Subject: [PATCH 3/3] Add target python version --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 342dbf3985e3..3ae4966f6f11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [tool.black] line_length = 130 +target_version = ["py37"] [tool.isort] multi_line_output = 3