Skip to content

Improve typing of classes decorated with definitions #3553

@bartfeenstra

Description

@bartfeenstra

PluginDefinition and DataDefinition both decorate classes, but require those classes to be aware of their decorators to type on them in their plugin() and data() methods.

Can we do this automatically by having the decorators return a new class which subclasses Plugin and HasData/Data automatically, and types its return value as an intersection?

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpythonPull requests that update Python code

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions