Merge pull request #663 from pytest-dev/pre-commit-ci-update-config

[pre-commit.ci] pre-commit autoupdate
This commit is contained in:
Alessio Bogon 2024-03-17 20:39:07 +01:00 committed by GitHub
commit 3ebd9c78c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 29 additions and 8 deletions

View File

@ -3,11 +3,11 @@
repos:
- repo: https://github.com/psf/black
# If you update the version here, also update it in tox.ini (py*-pytestlatest-linters)
rev: 23.11.0
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
@ -19,7 +19,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: ["--py38-plus"]

View File

@ -1,4 +1,5 @@
"""pytest-bdd public API."""
from __future__ import annotations
from pytest_bdd.scenario import scenario, scenarios

View File

@ -1,4 +1,5 @@
"""Cucumber json output formatter."""
from __future__ import annotations
import json
@ -46,7 +47,6 @@ def unconfigure(config: Config) -> None:
class LogBDDCucumberJSON:
"""Logging plugin for cucumber like json output."""
def __init__(self, logfile: str) -> None:

View File

@ -1,4 +1,5 @@
"""pytest-bdd Exceptions."""
from __future__ import annotations

View File

@ -23,6 +23,7 @@ Syntax example:
:note: There are no multiline steps, the description of the step must fit in
one line.
"""
from __future__ import annotations
import glob

View File

@ -1,4 +1,5 @@
"""pytest-bdd missing test code generation."""
from __future__ import annotations
import itertools

View File

@ -1,4 +1,5 @@
"""Step parsers."""
from __future__ import annotations
import abc
@ -103,13 +104,11 @@ TStepParser = TypeVar("TStepParser", bound=StepParser)
@overload
def get_parser(step_name: str) -> string:
...
def get_parser(step_name: str) -> string: ...
@overload
def get_parser(step_name: TStepParser) -> TStepParser:
...
def get_parser(step_name: TStepParser) -> TStepParser: ...
def get_parser(step_name: str | StepParser) -> StepParser:

View File

@ -1,4 +1,5 @@
"""Pytest plugin entry point. Used for any fixtures needed."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Callable, Generator, TypeVar, cast

View File

@ -3,6 +3,7 @@
Collection of the scenario execution statuses, timing and other information
that enriches the pytest test reporting.
"""
from __future__ import annotations
import time

View File

@ -10,6 +10,7 @@ test_publish_article = scenario(
scenario_name="Publishing the article",
)
"""
from __future__ import annotations
import contextlib

View File

@ -1,4 +1,5 @@
"""pytest-bdd scripts."""
from __future__ import annotations
import argparse

View File

@ -34,6 +34,7 @@ def _(article):
pass
"""
from __future__ import annotations
import enum

View File

@ -1,4 +1,5 @@
"""Common type definitions."""
from __future__ import annotations
FEATURE = "feature"

View File

@ -1,4 +1,5 @@
"""Various utility functions."""
from __future__ import annotations
import base64

View File

@ -1,4 +1,5 @@
"""Test cucumber json output."""
from __future__ import annotations
import json

View File

@ -1,4 +1,5 @@
"""Test feature base dir."""
import os
import pytest

View File

@ -1,4 +1,5 @@
"""Multiline steps tests."""
import textwrap
import pytest

View File

@ -1,4 +1,5 @@
"""Scenario Outline tests."""
import textwrap
from pytest_bdd.utils import collect_dumped_objects

View File

@ -1,4 +1,5 @@
"""Scenario Outline with empty example values tests."""
import textwrap
from pytest_bdd.utils import collect_dumped_objects

View File

@ -1,4 +1,5 @@
"""Test scenario reporting."""
import textwrap
import pytest

View File

@ -1,4 +1,5 @@
"""Test scenarios shortcut."""
import textwrap

View File

@ -1,4 +1,5 @@
"""Test tags."""
import textwrap
import pytest

View File

@ -1,4 +1,5 @@
"""Code generation and assertion tests."""
import itertools
import textwrap

View File

@ -2,6 +2,7 @@
Check the parent givens are collected and overridden in the local conftest.
"""
import textwrap
from pytest_bdd.utils import collect_dumped_objects

View File

@ -1,4 +1,5 @@
"""Given tests."""
import textwrap