temporalio / temporalio/sdk-python

[Feature Request] Allow use of type hints even if arg count mismatches in case of default params

Open
#360 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.2k
Forks
241
Avg merge
3d 21h
Merged PRs (30d)
55

Description

Describe the solution you'd like

Today we only use a type hint if the arg count matches the input count. But the args may have default values. So we need to at least use type hints when the required arg count matches the input count. Maybe we should just remove the check altogether and just use as many type hints as we can.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the type-hint handling that currently requires argument and input counts to match, then inspect nearby tests for default parameters and mismatched counts. Done means applicable type hints are used when required arguments match, or as many hints as the supported behavior allows.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.