Skip to content

Commit 635c7ac

Browse files
Updated files with 'repo_helper'. (#11)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent 5a74630 commit 635c7ac

File tree

9 files changed

+70
-45
lines changed

9 files changed

+70
-45
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python -VV
3232
python -m site
3333
python -m pip install --upgrade pip setuptools wheel
34-
python -m pip install tox
34+
python -m pip install --upgrade tox virtualenv
3535
3636
- name: "Run mypy"
3737
run: "python -m tox -e mypy"

.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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Contributing
44

55
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
66
7-
``flake8_sphinx_links`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging, and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
7+
``flake8_sphinx_links`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging,
8+
and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
89

910
Install ``pre-commit`` with ``pip`` and install the git hook:
1011

@@ -17,13 +18,13 @@ Install ``pre-commit`` with ``pip`` and install the git hook:
1718
Coding style
1819
--------------
1920

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

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

2425
.. code-block:: bash
2526
26-
$ pre-commit run yapf-isort -a
27+
$ pre-commit run formate -a
2728
2829
2930
Or, to run the complete autoformatting suite:
@@ -36,7 +37,8 @@ Or, to run the complete autoformatting suite:
3637
Automated tests
3738
-------------------
3839

39-
Tests are run with ``tox`` and ``pytest``. To run tests for a specific Python version, such as Python 3.6, run:
40+
Tests are run with ``tox`` and ``pytest``.
41+
To run tests for a specific Python version, such as Python 3.6:
4042

4143
.. code-block:: bash
4244

doc-source/contributing.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Overview
33

44
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
55
6-
``flake8_sphinx_links`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging, and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
6+
``flake8_sphinx_links`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging,
7+
and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
78

89
Install ``pre-commit`` with ``pip`` and install the git hook:
910

@@ -16,13 +17,13 @@ Install ``pre-commit`` with ``pip`` and install the git hook:
1617
Coding style
1718
--------------
1819

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

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

2324
.. prompt:: bash
2425

25-
pre-commit run yapf-isort -a
26+
pre-commit run formate -a
2627

2728

2829
Or, to run the complete autoformatting suite:
@@ -35,7 +36,8 @@ Or, to run the complete autoformatting suite:
3536
Automated tests
3637
-------------------
3738

38-
Tests are run with ``tox`` and ``pytest``. To run tests for a specific Python version, such as Python 3.6, run:
39+
Tests are run with ``tox`` and ``pytest``.
40+
To run tests for a specific Python version, such as Python 3.6:
3941

4042
.. prompt:: bash
4143

formate.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
"coverage_pyver_pragma",
38+
"domdf_python_tools",
39+
"flake8",
40+
"github",
41+
"pytest",
42+
"pytest_cov",
43+
"pytest_randomly",
44+
"pytest_rerunfailures",
45+
"pytest_timeout",
46+
"requests",
47+
]
48+
known_first_party = "flake8_sphinx_links"

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"

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
coincidence>=0.1.0
12
coverage>=5.1
23
coverage-pyver-pragma>=0.0.6
34
domdf-python-tools[testing]>=2.0.1

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ commands =
113113

114114
[flake8]
115115
max-line-length = 120
116-
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
116+
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 E302 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
117117
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
118118
rst-directives =
119119
TODO
120120
envvar
121121
extras-require
122122
per-file-ignores =
123123
tests/*: D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
124-
*/*.pyi: D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
124+
*/*.pyi: E302 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
125125
pytest-parametrize-names-type = csv
126126
inline-quotes = "
127127
multiline-quotes = """
@@ -132,6 +132,7 @@ count = True
132132
plugins = coverage_pyver_pragma
133133
134134
[coverage:report]
135+
fail_under = 80
135136
exclude_lines =
136137
raise AssertionError
137138
raise NotImplementedError
@@ -140,7 +141,6 @@ exclude_lines =
140141
if TYPE_CHECKING:
141142
if typing.TYPE_CHECKING:
142143
if __name__ == .__main__.:
143-
\.\.\.
144144
145145
[check-wheel-contents]
146146
ignore = W002

0 commit comments

Comments
 (0)