Update pre-commit config

This commit is contained in:
Alessio Bogon 2022-02-24 12:45:07 +01:00
parent 68078ba446
commit 512fd0f690
3 changed files with 5 additions and 6 deletions

View File

@ -3,7 +3,7 @@
repos:
- repo: https://github.com/psf/black
# If you update the version here, also update it in tox.ini (py*-pytestlatest-linters)
rev: 21.12b0
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
@ -19,7 +19,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]
args: [--py37-plus]

View File

@ -61,7 +61,7 @@ class LogBDDCucumberJSON:
result = {"status": "failed", "error_message": str(report.longrepr) if error_message else ""}
elif report.skipped:
result = {"status": "skipped"}
result["duration"] = int(math.floor((10 ** 9) * step["duration"])) # nanosec
result["duration"] = int(math.floor((10**9) * step["duration"])) # nanosec
return result
def _serialize_tags(self, item):

View File

@ -30,9 +30,8 @@ deps =
-r{toxinidir}/requirements-testing.txt
commands = {env:_PYTEST_CMD:pytest} {env:_PYTEST_MORE_ARGS:} {posargs:-vvl}
; Black doesn't support >py38 now
[testenv:py310-pytestlatest-linters]
deps = black==21.12b0
deps = black==22.1.0
commands = black --check --verbose setup.py docs pytest_bdd tests
[gh-actions]