closeio / closeio/tasktiger

Make `func.delay` typed when decorating `func` with `@tiger.task`

Open
#302 1 comment 0 reactions 1 assignee View on GitHub

@EGrunzke is already working on this.

Since Sep 8, 2025.

  • #361 by @EGrunzke — merged
enhancement
Dominant language
Python
Stars
1.5k
Forks
95
Avg merge
4d 21h
Merged PRs (30d)
1

Description

We're currently assigning delay as the attribute of func here, which results in the type of func.delay being Any.

To improve type safety, we should instead:

  • define a new class (called TaskDefinition?) with proper type annotations for delay, __call__ (etc.)
  • wrap func in an instance of that new class (wrapped = TaskDefinition(self, func))

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.