Skip to content

Commit 9fd25c8

Browse files
Updated files with 'repo_helper'. (#14)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent 66a6ad6 commit 9fd25c8

File tree

9 files changed

+59
-40
lines changed

9 files changed

+59
-40
lines changed

.isort.cfg

Lines changed: 0 additions & 28 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ repos:
6666
- id: remove-crlf
6767
- id: forbid-crlf
6868

69-
- repo: https://github.com/domdfcoding/yapf-isort
70-
rev: v0.5.5
69+
- repo: https://github.com/repo-helper/formate
70+
rev: v0.2.0
7171
hooks:
72-
- id: yapf-isort
73-
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.py$
72+
- id: formate
73+
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.(_)?py$
7474

7575
- repo: https://github.com/domdfcoding/dep_checker
7676
rev: v0.4.1

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ Install ``pre-commit`` with ``pip`` and install the git hook:
1818
Coding style
1919
--------------
2020

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

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

2525
.. code-block:: bash
2626
27-
$ pre-commit run yapf-isort -a
27+
$ pre-commit run formate -a
2828
2929
3030
Or, to run the complete autoformatting suite:

__pkginfo__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
]
2424

2525
__copyright__ = """
26-
2020 Dominic Davis-Foster <[email protected]>
26+
2020-2021 Dominic Davis-Foster <[email protected]>
2727
"""
2828

2929
__version__ = "0.0.6"

doc-source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
project = "coverage_pyver_pragma"
2727
slug = re.sub(r'\W+', '-', project.lower())
2828
release = version = __version__
29-
copyright = "2020 Dominic Davis-Foster" # pylint: disable=redefined-builtin
29+
copyright = "2020-2021 Dominic Davis-Foster" # pylint: disable=redefined-builtin
3030
language = "en"
3131
package_root = "coverage_pyver_pragma"
3232

doc-source/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Install ``pre-commit`` with ``pip`` and install the git hook:
1717
Coding style
1818
--------------
1919

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

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

2424
.. prompt:: bash
2525

26-
pre-commit run yapf-isort -a
26+
pre-commit run formate -a
2727

2828

2929
Or, to run the complete autoformatting suite:

formate.toml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[hooks]
2+
dynamic_quotes = 10
3+
collections-import-rewrite = 20
4+
reformat-generics = 40
5+
noqa-reformat = 60
6+
ellipsis-reformat = 70
7+
8+
[config]
9+
indent = "\t"
10+
line_length = 115
11+
12+
[hooks.yapf]
13+
priority = 30
14+
15+
[hooks.isort]
16+
priority = 50
17+
18+
[hooks.yapf.kwargs]
19+
yapf_style = ".style.yapf"
20+
21+
[hooks.isort.kwargs]
22+
line_length = 115
23+
indent = "\"\t\t\""
24+
multi_line_output = 8
25+
import_heading_stdlib = "stdlib"
26+
import_heading_thirdparty = "3rd party"
27+
import_heading_firstparty = "this package"
28+
import_heading_localfolder = "this package"
29+
balanced_wrapping = false
30+
lines_between_types = 0
31+
use_parentheses = true
32+
remove_redundant_aliases = true
33+
default_section = "THIRDPARTY"
34+
known_third_party = [
35+
"coincidence",
36+
"coverage",
37+
"domdf_python_tools",
38+
"flake8",
39+
"github",
40+
"pytest",
41+
"pytest_cov",
42+
"pytest_randomly",
43+
"pytest_rerunfailures",
44+
"pytest_timeout",
45+
"requests",
46+
]
47+
known_first_party = "coverage_pyver_pragma"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools>=40.6.0", "wheel>=0.34.2"]
2+
requires = [ "setuptools>=40.6.0", "wheel>=0.34.2",]
33
build-backend = "setuptools.build_meta"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ docstring-quotes = """
127127
count = True
128128
129129
[coverage:report]
130+
fail_under = 80
130131
exclude_lines =
131132
raise AssertionError
132133
raise NotImplementedError
@@ -135,7 +136,6 @@ exclude_lines =
135136
if TYPE_CHECKING:
136137
if typing.TYPE_CHECKING:
137138
if __name__ == .__main__.:
138-
:[\n\s]*\.\.\.
139139
140140
[check-wheel-contents]
141141
ignore = W002

0 commit comments

Comments
 (0)