Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #663

Merged
merged 3 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-bdd public API."""

from __future__ import annotations

from pytest_bdd.scenario import scenario, scenarios
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_bdd/cucumber_json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Cucumber json output formatter."""

from __future__ import annotations

import json
Expand Down Expand Up @@ -46,7 +47,6 @@ def unconfigure(config: Config) -> None:


class LogBDDCucumberJSON:

"""Logging plugin for cucumber like json output."""

def __init__(self, logfile: str) -> None:
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-bdd Exceptions."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
:note: There are no multiline steps, the description of the step must fit in
one line.
"""

from __future__ import annotations

import glob
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/generation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-bdd missing test code generation."""

from __future__ import annotations

import itertools
Expand Down
7 changes: 3 additions & 4 deletions src/pytest_bdd/parsers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Step parsers."""

from __future__ import annotations

import abc
Expand Down Expand Up @@ -103,13 +104,11 @@ def is_matching(self, name: str) -> bool:


@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:
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/plugin.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
scenario_name="Publishing the article",
)
"""

from __future__ import annotations

import contextlib
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/scripts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-bdd scripts."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def _(article):
pass

"""

from __future__ import annotations

import enum
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common type definitions."""

from __future__ import annotations

FEATURE = "feature"
Expand Down
1 change: 1 addition & 0 deletions src/pytest_bdd/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Various utility functions."""

from __future__ import annotations

import base64
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_cucumber_json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test cucumber json output."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_feature_base_dir.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test feature base dir."""

import os

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_multiline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Multiline steps tests."""

import textwrap

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_outline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Scenario Outline tests."""

import textwrap

from pytest_bdd.utils import collect_dumped_objects
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_outline_empty_values.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Scenario Outline with empty example values tests."""

import textwrap

from pytest_bdd.utils import collect_dumped_objects
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test scenario reporting."""

import textwrap

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_scenarios.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test scenarios shortcut."""

import textwrap


Expand Down
1 change: 1 addition & 0 deletions tests/feature/test_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test tags."""

import textwrap

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/generation/test_generate_missing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Code generation and assertion tests."""

import itertools
import textwrap

Expand Down
1 change: 1 addition & 0 deletions tests/library/test_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/steps/test_given.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Given tests."""

import textwrap


Expand Down