Skip to content

Commit 3a8ca0a

Browse files
committed
Add pre-commit configuration and badges
1 parent e5695a4 commit 3a8ca0a

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
13+
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
1414
include:
1515
- python: "3.6"
1616
tox_env: "py36"

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 21.9b0
4+
hooks:
5+
- id: black
6+
args: [--safe, --quiet]
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v4.0.1
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- repo: local
13+
hooks:
14+
- id: rst
15+
name: rst
16+
entry: rst-lint --encoding utf-8
17+
files: ^(CHANGELOG|README.rst)$
18+
language: python
19+
additional_dependencies: [pygments, restructuredtext_lint]
20+
- repo: https://github.com/asottile/reorder_python_imports
21+
rev: v2.6.0
22+
hooks:
23+
- id: reorder-python-imports
24+
args: ['--application-directories=.:src']
25+

README.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This plugin **does not work on Windows** because there's no ``fork`` support.
1414
* ``--forked``: run each test in a forked
1515
subprocess to survive ``SEGFAULTS`` or otherwise dying processes.
1616

17-
|python| |version| |ci|
17+
|python| |version| |ci| |pre-commit| |black|
1818

1919
.. |version| image:: http://img.shields.io/pypi/v/pytest-forked.svg
2020
:target: https://pypi.python.org/pypi/pytest-forked
@@ -25,6 +25,12 @@ This plugin **does not work on Windows** because there's no ``fork`` support.
2525
.. |python| image:: https://img.shields.io/pypi/pyversions/pytest-forked.svg
2626
:target: https://pypi.python.org/pypi/pytest-forked/
2727

28+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
29+
:target: https://github.com/ambv/black
30+
31+
.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest-forked/master.svg
32+
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest-forked/master
33+
2834
Installation
2935
-----------------------
3036

0 commit comments

Comments
 (0)