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

[Feature request] Make StepContext available in public API for annotations #792

Open
1 task done
gryznar opened this issue Feb 8, 2024 · 0 comments
Open
1 task done
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:core

Comments

@gryznar
Copy link

gryznar commented Feb 8, 2024

I'm submitting a ...

  • feature request

What is the current behavior?

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)

What is the expected behavior?

Make StepContext available in allure.py

What is the motivation / use case for changing the behavior?

Adding StepContext to public API will allow to annotate return type of allure_step__foo in a nice and simple way via:

def allure_step__foo(content: str) -> StepContext: ...
@delatrie delatrie added theme:core task:improvement Change that improves some user experience but can't be considered a new feature labels Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:core
Projects
None yet
Development

No branches or pull requests

2 participants