Open gryznar opened 9 months ago
def allure_step__foo(content: str): return allure.step(content)
Annotating return type of such function is not possible, because allure.step returns internal StepContext (under _allure.py)
allure.step
StepContext
_allure.py
Make StepContext available in allure.py
allure.py
Adding StepContext to public API will allow to annotate return type of allure_step__foo in a nice and simple way via:
allure_step__foo
def allure_step__foo(content: str) -> StepContext: ...
I'm submitting a ...
What is the current behavior?
Annotating return type of such function is not possible, because
allure.step
returns internalStepContext
(under_allure.py
)What is the expected behavior?
Make
StepContext
available inallure.py
What is the motivation / use case for changing the behavior?
Adding
StepContext
to public API will allow to annotate return type ofallure_step__foo
in a nice and simple way via: