Skip to content

Commit

Permalink
Use Py3+ autoformat configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Jan 1, 2020
1 parent b0e7ede commit 3499d76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[settings]
default_section = THIRDPARTY
known_first_party = hypothesis, hypothesistooling, tests
add_imports = from __future__ import absolute_import, from __future__ import print_function, from __future__ import division
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
Expand Down
8 changes: 3 additions & 5 deletions tooling/src/hypothesistooling/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ def deploy():


HEADER = """
# coding=utf-8
#
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
Expand Down Expand Up @@ -239,12 +237,12 @@ def should_format_doc_file(path):
"--remove-unused-variables",
*files_to_format,
)
pip_tool("pyupgrade", "--keep-percent-format", *files_to_format)
pip_tool("pyupgrade", "--keep-percent-format", "--py3-plus", *files_to_format)
pip_tool("isort", *files_to_format)
pip_tool("black", *files_to_format)
pip_tool("black", "--target-version=py35", *files_to_format)


VALID_STARTS = ("# coding=utf-8", "#!/usr/bin/env python")
VALID_STARTS = (HEADER.split()[0], "#!/usr/bin/env python")


@task()
Expand Down

0 comments on commit 3499d76

Please sign in to comment.