tox.ini: apply codestyle
This commit is contained in:
parent
48f4c83008
commit
147a28360b
|
@ -2,20 +2,30 @@
|
||||||
# See https://pre-commit.com/hooks.html for more hooks
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.1.0
|
rev: v3.3.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ['--keep-percent-format', '--py37-plus']
|
args: ['--keep-percent-format', '--py39-plus']
|
||||||
|
- repo: https://github.com/adamchainz/django-upgrade
|
||||||
|
rev: 1.13.0
|
||||||
|
hooks:
|
||||||
|
- id: django-upgrade
|
||||||
|
args: ['--target-version', '3.2']
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.3.0
|
rev: 23.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
|
args: ['--target-version', 'py39', '--skip-string-normalization', '--line-length', '110']
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.12.0
|
rev: 5.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
args: ['--profile', 'black', '--line-length', '110']
|
args: ['--profile', 'black', '--line-length', '110']
|
||||||
|
- repo: https://github.com/rtts/djhtml
|
||||||
|
rev: '3.0.5'
|
||||||
|
hooks:
|
||||||
|
- id: djhtml
|
||||||
|
args: ['--tabwidth', '2']
|
||||||
- repo: https://git.entrouvert.org/pre-commit-debian.git
|
- repo: https://git.entrouvert.org/pre-commit-debian.git
|
||||||
rev: v0.1
|
rev: v0.1
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -283,7 +283,6 @@ def test_handle_pull_request_draft(mocker):
|
||||||
|
|
||||||
|
|
||||||
def test_handle_pull_request_edited_already_linked_does_nothing(mocker):
|
def test_handle_pull_request_edited_already_linked_does_nothing(mocker):
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
"action": "edited",
|
"action": "edited",
|
||||||
"pull_request": {
|
"pull_request": {
|
||||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,5 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
envlist = py3,code-style
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv =
|
setenv =
|
||||||
|
@ -15,3 +16,11 @@ deps =
|
||||||
pytest-mock
|
pytest-mock
|
||||||
commands =
|
commands =
|
||||||
pytest {posargs}
|
pytest {posargs}
|
||||||
|
|
||||||
|
[testenv:code-style]
|
||||||
|
basepython = python3
|
||||||
|
skip_install = true
|
||||||
|
deps =
|
||||||
|
pre-commit
|
||||||
|
commands =
|
||||||
|
pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
Loading…
Reference in New Issue