Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ def my_job_mutator(bundle: Bundle, job: Job) -> Job:
"""


# Below, we define decorators for each resource type. This approach allows us
# to implement mutators that are only applied for specific resource types.
#
# Alternative approaches considered and rejected during design:
#
# - Inspecting type annotations without decorators.
# Rationale: Avoid implicit runtime behavior changes based solely on type annotations,
# especially if a function lacks an explicit decorator.
#
# - Using a universal @mutator decorator.
# Rationale: Determining whether a mutator is invoked based solely on type annotations
# was deemed overly implicit and potentially confusing.


@overload
def job_mutator(
function: Callable[[Bundle, "Job"], "Job"],
Expand Down
Loading