Skip to content

Commit 41a605e

Browse files
committed
A try to fix circular import
1 parent f223bbe commit 41a605e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

reportportal_client/steps/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_my_nested_step():
4545
from functools import wraps
4646
from typing import Callable, ParamSpec, TypeVar, Optional, Dict, Union, Type
4747

48-
from reportportal_client import RP
48+
import reportportal_client as rp
4949
# noinspection PyProtectedMember
5050
from reportportal_client._internal.aio.tasks import Task
5151
# noinspection PyProtectedMember
@@ -63,9 +63,9 @@ def test_my_nested_step():
6363
class StepReporter:
6464
"""Nested Steps context handling class."""
6565

66-
client: RP
66+
client: rp.RP
6767

68-
def __init__(self, rp_client: RP):
68+
def __init__(self, rp_client: rp.RP):
6969
"""Initialize required attributes.
7070
7171
:param rp_client: ReportPortal client which will be used to report
@@ -104,10 +104,10 @@ class Step(Callable[[_Param], _Return]):
104104
name: str
105105
params: Dict
106106
status: str
107-
client: Optional[RP]
107+
client: Optional[rp.RP]
108108
__item_id: Union[Optional[str], Task[Optional[str]]]
109109

110-
def __init__(self, name: str, params: Dict, status: str, rp_client: Optional[RP]):
110+
def __init__(self, name: str, params: Dict, status: str, rp_client: Optional[rp.RP]) -> None:
111111
"""Initialize required attributes.
112112
113113
:param name: Nested Step name
@@ -173,7 +173,7 @@ def wrapper(*my_args, **my_kwargs):
173173

174174

175175
def step(name_source: Union[Callable[[_Param], _Return], str], params: Optional[Dict] = None, status: str = 'PASSED',
176-
rp_client: Optional[RP] = None) -> Callable[[_Param], _Return]:
176+
rp_client: Optional[rp.RP] = None) -> Callable[[_Param], _Return]:
177177
"""Nested step report function.
178178
179179
Create a Nested Step inside a test method on ReportPortal.

0 commit comments

Comments
 (0)