Skip to content

Commit f828c91

Browse files
committed
Update types
1 parent 7c8496a commit f828c91

File tree

4 files changed

+71
-71
lines changed

4 files changed

+71
-71
lines changed

pytest_reportportal/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import warnings
1717
from os import getenv
18-
from typing import Any, List, Optional, Tuple, Union
18+
from typing import Any, Optional, Union
1919

2020
from _pytest.config import Config
2121
from reportportal_client import ClientType, OutputType
@@ -50,8 +50,8 @@ class AgentConfig:
5050
rp_bts_url: str
5151
rp_launch: str
5252
rp_launch_id: Optional[str]
53-
rp_launch_attributes: Optional[List[str]]
54-
rp_tests_attributes: Optional[List[str]]
53+
rp_launch_attributes: Optional[list[str]]
54+
rp_tests_attributes: Optional[list[str]]
5555
rp_launch_description: str
5656
rp_log_batch_size: int
5757
rp_log_batch_payload_limit: int
@@ -78,7 +78,7 @@ class AgentConfig:
7878
rp_launch_timeout: int
7979
rp_launch_uuid_print: bool
8080
rp_launch_uuid_print_output: Optional[OutputType]
81-
rp_http_timeout: Optional[Union[Tuple[float, float], float]]
81+
rp_http_timeout: Optional[Union[tuple[float, float], float]]
8282
rp_report_fixtures: bool
8383

8484
def __init__(self, pytest_config: Config) -> None:

pytest_reportportal/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import os.path
1818
import time
1919
from logging import Logger
20-
from typing import Any, Callable, Dict, Generator
20+
from typing import Any, Callable, Generator
2121

2222
import _pytest.logging
2323
import dill as pickle
@@ -410,7 +410,7 @@ def pytest_bdd_after_step(
410410
scenario: Scenario,
411411
step: Step,
412412
step_func: Callable[..., Any],
413-
step_func_args: Dict[str, Any],
413+
step_func_args: dict[str, Any],
414414
) -> Generator[None, Any, None]:
415415
"""Report BDD step finish.
416416
@@ -439,7 +439,7 @@ def pytest_bdd_step_error(
439439
scenario: Scenario,
440440
step: Step,
441441
step_func: Callable[..., Any],
442-
step_func_args: Dict[str, Any],
442+
step_func_args: dict[str, Any],
443443
exception,
444444
) -> Generator[None, Any, None]:
445445
"""Report BDD step error.

pytest_reportportal/rp_logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import threading
1919
from contextlib import contextmanager
2020
from functools import wraps
21-
from typing import Any, Dict, List
21+
from typing import Any
2222

2323
from reportportal_client import RPLogger, current, set_current
2424
from reportportal_client.core.worker import APIWorker
@@ -114,7 +114,7 @@ def patching_logger_class():
114114

115115
def wrap_log(original_func):
116116
@wraps(original_func)
117-
def _log(self, *args: List[Any], **kwargs: Dict[str, Any]):
117+
def _log(self, *args: list[Any], **kwargs: dict[str, Any]):
118118
my_kwargs = kwargs.copy()
119119
attachment = my_kwargs.pop("attachment", None)
120120
if attachment is not None:

0 commit comments

Comments
 (0)