Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions