| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
it seems something is wrong withing CI build pipeline, not the PR. could please someone take a look? this PR might help a lot of people :) |
Sorry, something went wrong.
There was a problem hiding this comment.
Hi, @darsor ! Thank you for contributing in allure-python!
Let's better use @typing.overload:
@overload
def step(title: str) -> StepContext:
...
@overload
def step(title: _TFunc) -> _TFunc:
...This will require moving StepContext above step.
And it also makes sense to disable type checking when returning the wrapper in StepContext.__call__ for those of us who enable pyright when working on the repo :)
return impl # type: ignore
Sorry, something went wrong.
|
Turns out #830 implements this in a more correct way. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Context
Current versions of Pyright flag errors on functions decorated with @allure.step, as reported in #828. Adding type hints to allure.step fixes this issue.
Tests pass on Python 3.7 and Python 3.13.
Checklist