Skip to content

Make func.delay typed when decorating func with @tiger.task #302

@neob91-close

Description

@neob91-close

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))

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions