allure-framework / allure-framework/allure-python
[Feature request] Make `StepContext` available in public API for annotations
- Langage dominant
- Python
- Étoiles
- 814
- Forks
- 260
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
#### I'm submitting a ...
- [x] feature request
#### What is the current behavior?
```python
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:
```python
def allure_step__foo(content: str) -> StepContext: ...
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par lire la définition de StepContext et son utilisation dans _allure.py, puis examinez les exports publics de allure.py. Rendez StepContext disponible depuis allure.py afin que le wrapper d’exemple puisse l’utiliser dans une annotation de retour, et vérifiez que l’import public fonctionne.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api
- Type d'issue
- Fonctionnalité
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 35/100