FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(commons): tiny fixes of step type checking by delatrie · Pull Request #846 · allure-framework/allure-python · GitHub

chore(commons): tiny fixes of step type checking - #846

Merged
delatrie merged 2 commits into
masterfrom
step-typing-fixes
Mar 27, 2025
Merged

chore(commons): tiny fixes of step type checking#846
delatrie merged 2 commits into
masterfrom
step-typing-fixes

Conversation

Copy link
Copy Markdown
Contributor

Context

#830 introduces proper typing annotations for allure.step via @typing.overload.

This PR removes the annotations from the implementation as per the Python docs:

The @overload-decorated definitions are for the benefit of the type checker only, since they will be overwritten by the non-@overload-decorated definition, while the latter is used at runtime but should be ignored by a type checker.

It also disables type checking of the wrapper function returned by StepContext.__call__ (it can't be typechecked without ParamSpec, which is only available in Python 3.10+).

delatrie added the type:internal Change that isn't visible or obvious for end users label Mar 27, 2025
delatrie force-pushed the step-typing-fixes branch from 668a490 to 51cf7ce Compare March 27, 2025 09:09
delatrie merged commit e9003d0 into master Mar 27, 2025
delatrie deleted the step-typing-fixes branch March 27, 2025 09:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:core type:internal Change that isn't visible or obvious for end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL