Skip to content

Commit 150440a

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

File tree

7 files changed

+72
-53
lines changed

7 files changed

+72
-53
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 & 29 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-github-actions`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging, and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
7+
``flake8-github-actions`` 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

formate.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
"apeye",
36+
"attrs",
37+
"click",
38+
"consolekit",
39+
"domdf_python_tools",
40+
"dulwich",
41+
"flake8",
42+
"flake8_json",
43+
"flake8_prettycount",
44+
"github",
45+
"github3_py",
46+
"requests",
47+
"typing_extensions",
48+
]
49+
known_first_party = "flake8_github_actions"

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: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
# * testenv:lint
99
# * testenv:mypy
1010
# * testenv:pyup
11-
# * testenv:coverage
1211
# * flake8
13-
# * coverage:run
14-
# * coverage:report
1512
# * check-wheel-contents
1613
# * pytest
1714

@@ -84,21 +81,30 @@ commands = pyup_dirs flake8_github_actions --py36-plus --recursive
8481

8582
[flake8]
8683
max-line-length = 120
87-
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
84+
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
8885
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
8986
rst-directives =
9087
TODO
9188
envvar
9289
extras-require
9390
per-file-ignores =
9491
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
95-
*/*.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
92+
*/*.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
9693
pytest-parametrize-names-type = csv
9794
inline-quotes = "
9895
multiline-quotes = """
9996
docstring-quotes = """
10097
count = True
10198
99+
[check-wheel-contents]
100+
ignore = W002
101+
toplevel = flake8_github_actions
102+
package = flake8_github_actions
103+
104+
[pytest]
105+
addopts = --color yes --durations 25
106+
timeout = 300
107+
102108
[coverage:run]
103109
plugins = coverage_pyver_pragma
104110
@@ -113,15 +119,6 @@ exclude_lines =
113119
if __name__ == .__main__.:
114120
\.\.\.
115121
116-
[check-wheel-contents]
117-
ignore = W002
118-
toplevel = flake8_github_actions
119-
package = flake8_github_actions
120-
121-
[pytest]
122-
addopts = --color yes --durations 25
123-
timeout = 300
124-
125122
[gh-actions]
126123
python =
127124
3.6: py36, build, mypy

0 commit comments

Comments
 (0)