Skip to content

Commit

Permalink
Merge 464cd39 into 2c73442
Browse files Browse the repository at this point in the history
  • Loading branch information
repo-helper[bot] committed Jan 27, 2021
2 parents 2c73442 + 464cd39 commit a4ab6d2
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 49 deletions.
40 changes: 0 additions & 40 deletions .isort.cfg

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ repos:
- id: remove-crlf
- id: forbid-crlf

- repo: https://github.com/domdfcoding/yapf-isort
rev: v0.5.5
- repo: https://github.com/repo-helper/formate
rev: v0.1.0
hooks:
- id: yapf-isort
- id: formate
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.py$

- repo: https://github.com/domdfcoding/dep_checker
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Install ``pre-commit`` with ``pip`` and install the git hook:
Coding style
--------------

`yapf-isort <https://pypi.org/project/yapf-isort/>`_ is used for code formatting.
`formate <https://formate.readthedocs.io>`_ is used for code formatting.

It can be run manually via ``pre-commit``:

.. code-block:: bash
$ pre-commit run yapf-isort -a
$ pre-commit run formate -a
Or, to run the complete autoformatting suite:
Expand Down
4 changes: 2 additions & 2 deletions doc-source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Install ``pre-commit`` with ``pip`` and install the git hook:
Coding style
--------------

`yapf-isort <https://pypi.org/project/yapf-isort/>`_ is used for code formatting.
`formate <https://formate.readthedocs.io>`_ is used for code formatting.

It can be run manually via ``pre-commit``:

.. prompt:: bash

pre-commit run yapf-isort -a
pre-commit run formate -a


Or, to run the complete autoformatting suite:
Expand Down
60 changes: 60 additions & 0 deletions formate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[hooks]
dynamic_quotes = 10
collections-import-rewrite = 20
reformat-generics = 40
noqa-reformat = 60
ellipsis-reformat = 70

[config]
indent = "\t"
line_length = 115

[hooks.yapf]
priority = 30

[hooks.isort]
priority = 50

[hooks.yapf.kwargs]
yapf_style = ".style.yapf"

[hooks.isort.kwargs]
line_length = 115
indent = "\"\t\t\""
multi_line_output = 8
import_heading_stdlib = "stdlib"
import_heading_thirdparty = "3rd party"
import_heading_firstparty = "this package"
import_heading_localfolder = "this package"
balanced_wrapping = false
lines_between_types = 0
use_parentheses = true
remove_redundant_aliases = true
default_section = "THIRDPARTY"
known_third_party = [
"apeye",
"betamax",
"click",
"coincidence",
"consolekit",
"coverage",
"coverage_pyver_pragma",
"deprecation_alias",
"domdf_python_tools",
"dulwich",
"github",
"github3_py",
"github3_utils",
"pymacaroons",
"pynacl",
"pytest",
"pytest_cov",
"pytest_randomly",
"pytest_timeout",
"repo_helper",
"requests",
"southwark",
"typing_extensions",
"virtualenv",
]
known_first_party = "repo_helper_github"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools>=40.6.0", "wheel>=0.34.2"]
requires = [ "setuptools>=40.6.0", "wheel>=0.34.2",]
build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ count = True
plugins = coverage_pyver_pragma
[coverage:report]
fail_under = 80
exclude_lines =
raise AssertionError
raise NotImplementedError
Expand All @@ -141,7 +142,6 @@ exclude_lines =
if TYPE_CHECKING:
if typing.TYPE_CHECKING:
if __name__ == .__main__.:
:[\n\s]*\.\.\.
[check-wheel-contents]
ignore = W002
Expand Down

0 comments on commit a4ab6d2

Please sign in to comment.