Closed alicederyn closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.6%. Comparing base (
d553546
) to head (d8a847d
). Report is 132 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Just spotted that I missed the Workflow overload. Moving back to draft until I fix and test that.
Pull Request Checklist
Description of PR Currently, @script-decorated user functions return a union of callables, making it impossible to type-check without suppressing mypy's 'call-arg' error (or equivalent), which completely disables parameter type-checking.
This PR changes the type annotations to use an overloaded callable Protocol to select the signature most likely to be what the user was intending to pick.
Unfortunately, the call signatures to Step and Task have to be duplicated, as:
name
parameter is required in Step and Task but optional when calling a @script-decorated user functionScreenshots
VSCode tooltips
The help text here comes from the docstrings in the new Protocol; to obtain this, I had to suppress ruff's D418 rule.