Skip to content

LazyTrait and apply_transform API issueΒ #6597

@wyli

Description

@wyli

Describe the bug
The pattern of invoking transforms with a lazy parameter depending on isinstance(transform, LazyTrait) is problematic

return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data)

because the LazyTrait API doesn't provide a __call__ design.
class LazyTrait:
"""
An interface to indicate that the transform has the capability to execute using

(introduced since #6537)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions