Skip to content

Commit abb9c6e

Browse files
[repo-helper] Configuration Update (#12)
* Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent d34a76c commit abb9c6e

14 files changed

+113
-56
lines changed

.github/milestones.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python
2+
3+
# stdlib
4+
import os
5+
import sys
6+
7+
# 3rd party
8+
from github3 import GitHub
9+
from github3.repos import Repository
10+
from packaging.version import InvalidVersion, Version
11+
12+
latest_tag = os.environ["GITHUB_REF_NAME"]
13+
14+
try:
15+
current_version = Version(latest_tag)
16+
except InvalidVersion:
17+
sys.exit()
18+
19+
gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"])
20+
repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1))
21+
22+
for milestone in repo.milestones(state="open"):
23+
try:
24+
milestone_version = Version(milestone.title)
25+
except InvalidVersion:
26+
continue
27+
if milestone_version == current_version:
28+
sys.exit(not milestone.update(state="closed"))

.github/stale.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ daysUntilStale: 180
77

88
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
99
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
10-
daysUntilClose: 180
10+
daysUntilClose: false
1111

1212
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
1313
onlyLabels: []
@@ -31,10 +31,10 @@ exemptAssignees: false
3131
staleLabel: stale
3232

3333
# Comment to post when marking as stale. Set to `false` to disable
34-
markComment: >
35-
This issue has been automatically marked as stale because it has not had
36-
recent activity. It will be closed if no further activity occurs. Thank you
37-
for your contributions.
34+
markComment: false
35+
# This issue has been automatically marked as stale because it has not had
36+
# recent activity. It will be closed if no further activity occurs. Thank you
37+
# for your contributions.
3838

3939
# Comment to post when removing the stale label.
4040
# unmarkComment: >

.github/workflows/cleanup.yml

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

.github/workflows/flake8.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
pull_request:
1112

1213
permissions:

.github/workflows/mypy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
pull_request:
1112

1213
permissions:

.github/workflows/python_ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011

1112
pull_request:
1213

1314
permissions:
1415
actions: write
16+
issues: write
1517
contents: read
1618

1719
jobs:
@@ -20,7 +22,7 @@ jobs:
2022
runs-on: "windows-2019"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.1'
25+
USING_COVERAGE: '3.7,3.8,3.9,3.10'
2426

2527
strategy:
2628
fail-fast: False
@@ -29,7 +31,7 @@ jobs:
2931
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3032
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3133
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
32-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
34+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3335

3436
steps:
3537
- name: Checkout 🛎️

.github/workflows/python_ci_linux.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
tags:
1112
- '*'
1213
pull_request:
1314

1415
permissions:
1516
actions: write
17+
issues: write
1618
contents: read
1719

1820
jobs:
@@ -21,7 +23,7 @@ jobs:
2123
runs-on: "ubuntu-20.04"
2224
continue-on-error: ${{ matrix.config.experimental }}
2325
env:
24-
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.1'
26+
USING_COVERAGE: '3.7,3.8,3.9,3.10'
2527

2628
strategy:
2729
fail-fast: False
@@ -30,7 +32,7 @@ jobs:
3032
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3133
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3234
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
33-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
35+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3436

3537
steps:
3638
- name: Checkout 🛎️

.github/workflows/python_ci_macos.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011

1112
pull_request:
1213

1314
permissions:
1415
actions: write
16+
issues: write
1517
contents: read
1618

1719
jobs:
@@ -20,7 +22,7 @@ jobs:
2022
runs-on: "macos-latest"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.1'
25+
USING_COVERAGE: '3.7,3.8,3.9,3.10'
2426

2527
strategy:
2628
fail-fast: False
@@ -29,7 +31,7 @@ jobs:
2931
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3032
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3133
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
32-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
34+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3335

3436
steps:
3537
- name: Checkout 🛎️

.pre-commit-config.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exclude: ^$
55

66
repos:
77
- repo: https://github.com/repo-helper/pyproject-parser
8-
rev: v0.4.1
8+
rev: v0.4.3
99
hooks:
1010
- id: reformat-pyproject
1111

@@ -30,7 +30,7 @@ repos:
3030
- id: end-of-file-fixer
3131

3232
- repo: https://github.com/domdfcoding/pre-commit-hooks
33-
rev: v0.2.1
33+
rev: v0.3.0
3434
hooks:
3535
- id: requirements-txt-sorter
3636
args:
@@ -40,7 +40,7 @@ repos:
4040
- id: bind-requirements
4141

4242
- repo: https://github.com/domdfcoding/flake8-dunder-all
43-
rev: v0.1.7
43+
rev: v0.1.8
4444
hooks:
4545
- id: ensure-dunder-all
4646
files: ^testing_tox/.*\.py$
@@ -51,7 +51,7 @@ repos:
5151
- id: flake2lint
5252

5353
- repo: https://github.com/pre-commit/pygrep-hooks
54-
rev: v1.8.0
54+
rev: v1.9.0
5555
hooks:
5656
- id: python-no-eval
5757
- id: rst-backticks
@@ -67,13 +67,18 @@ repos:
6767
- --keep-runtime-typing
6868

6969
- repo: https://github.com/Lucas-C/pre-commit-hooks
70-
rev: v1.1.10
70+
rev: v1.1.13
7171
hooks:
7272
- id: remove-crlf
7373
- id: forbid-crlf
7474

75-
- repo: https://github.com/repo-helper/formate
76-
rev: v0.4.9
75+
- repo: https://github.com/python-formate/snippet-fmt
76+
rev: v0.1.4
77+
hooks:
78+
- id: snippet-fmt
79+
80+
- repo: https://github.com/python-formate/formate
81+
rev: v0.4.10
7782
hooks:
7883
- id: formate
7984
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ testing-tox
4444
:target: https://github.com/python-coincidence/testing-tox/actions?query=workflow%3A%22mypy%22
4545
:alt: mypy status
4646

47-
.. |requires| image:: https://requires.io/github/python-coincidence/testing-tox/requirements.svg?branch=master
48-
:target: https://requires.io/github/python-coincidence/testing-tox/requirements/?branch=master
47+
.. |requires| image:: https://dependency-dash.herokuapp.com/github/python-coincidence/testing-tox/badge.svg
48+
:target: https://dependency-dash.herokuapp.com/github/python-coincidence/testing-tox/
4949
:alt: Requirements Status
5050

5151
.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/python-coincidence/testing-tox?logo=codefactor
@@ -67,7 +67,7 @@ testing-tox
6767
:target: https://github.com/python-coincidence/testing-tox/commit/master
6868
:alt: GitHub last commit
6969

70-
.. |maintained| image:: https://img.shields.io/maintenance/yes/2021
70+
.. |maintained| image:: https://img.shields.io/maintenance/yes/2022
7171
:alt: Maintenance
7272

7373
.. end shields

__pkginfo__.py

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

justfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
default: lint
2+
3+
pdf-docs: latex-docs
4+
make -C doc-source/build/latex/
5+
6+
latex-docs:
7+
SPHINX_BUILDER=latex tox -e docs
8+
9+
unused-imports:
10+
tox -e lint -- --select F401
11+
12+
incomplete-defs:
13+
#!/usr/bin/env bash
14+
tox -e mypy -- --disallow-incomplete-defs --disallow-untyped-defs | grep "Function is missing a .* annotation" || exit 0
15+
16+
vdiff:
17+
git diff $(repo-helper show version -q)..HEAD
18+
19+
bare-ignore:
20+
greppy '# type:? *ignore(?!\[|\w)' -s
21+
22+
lint: unused-imports incomplete-defs bare-ignore
23+
tox -n qa

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,20 @@ namespace_packages = true
4848
check_untyped_defs = true
4949
warn_unused_ignores = true
5050
no_implicit_optional = true
51+
show_error_codes = true
52+
53+
[tool.snippet-fmt]
54+
directives = [ "code-block",]
55+
56+
[tool.dependency-dash."requirements.txt"]
57+
order = 10
58+
59+
[tool.snippet-fmt.languages.python]
60+
reformat = true
61+
62+
[tool.snippet-fmt.languages.TOML]
63+
reformat = true
64+
65+
[tool.snippet-fmt.languages.ini]
66+
67+
[tool.snippet-fmt.languages.json]

tox.ini

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ envlist = py37, py38, py39, py310-dev, mypy, build
1717
skip_missing_interpreters = True
1818
isolated_build = True
1919
requires =
20-
pip>=20.3.3
20+
pip>=21
2121
tox-envlist>=0.2.1
22-
tox-pip-version>=0.0.7
2322

2423
[envlists]
2524
test = py37, py38, py39, py310-dev
2625
qa = mypy, lint
2726

2827
[testenv]
29-
setenv = PYTHONDEVMODE = 1
28+
setenv =
29+
PYTHONDEVMODE=1
30+
PIP_DISABLE_PIP_VERSION_CHECK=1
3031
deps = importcheck>=0.1.0
3132
commands =
3233
python --version
@@ -60,13 +61,14 @@ deps =
6061
flake8-noqa>=1.1.0
6162
flake8-pyi>=20.10.0
6263
flake8-pytest-style>=1.3.0
64+
flake8-quotes>=3.3.0
6365
flake8-slots>=0.1.0
6466
flake8-sphinx-links>=0.0.4
6567
flake8-strftime>=0.1.1
6668
flake8-typing-imports>=1.10.0
67-
git+https://github.com/domdfcoding/flake8-quotes.git
6869
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
6970
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
71+
git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods
7072
pydocstyle>=6.0.0
7173
pygments>=2.7.1
7274
importlib_metadata<4.5.0; python_version<'3.8'
@@ -76,7 +78,7 @@ commands = python3 -m flake8_rst_docstrings_sphinx testing_tox --allow-toolbox {
7678
basepython = python3.7
7779
ignore_errors = True
7880
changedir = {toxinidir}
79-
deps = mypy==0.910
81+
deps = mypy==0.942
8082
commands = mypy testing_tox {posargs}
8183

8284
[testenv:pyup]
@@ -107,6 +109,10 @@ multiline-quotes = """
107109
docstring-quotes = """
108110
count = True
109111
min_python_version = 3.7
112+
unused-arguments-ignore-abstract-functions = True
113+
unused-arguments-ignore-overload-functions = True
114+
unused-arguments-ignore-magic-methods = True
115+
unused-arguments-ignore-variadic-names = True
110116
111117
[check-wheel-contents]
112118
ignore = W002

0 commit comments

Comments
 (0)