loki.transformations.idempotence
Classes
A custom transformation that does absolutely nothing! |
- class IdemTransformation
Bases:
Transformation
A custom transformation that does absolutely nothing!
This can be used to test simple parse-unparse cycles.
- transform_subroutine(routine, **kwargs)
Defines the transformation to apply to
Subroutine
items.For transformations that modify
Subroutine
objects, this method should be implemented. It gets called via the dispatch methodapply()
.- Parameters:
routine (
Subroutine
) – The subroutine to be transformed.**kwargs (optional) – Keyword arguments for the transformation.