Skip to content

Conversation

@kanterov
Copy link
Collaborator

Changes

Clarify the behavior of Python mutators.

@kanterov kanterov marked this pull request as ready for review March 13, 2025 10:53
@kanterov kanterov temporarily deployed to test-trigger-is March 13, 2025 10:53 — with GitHub Actions Inactive
from databricks.bundles.jobs import Job
@job_mutator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the decorator only wraps the function in a class, could we get rid of it entirely and just look at the function signature to figure out what kind of mutator it is?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find the exact PEP where it's written, but asking ChatGPT:

Python’s design treats annotations as metadata rather than as elements that alter code behavior. In other words, they are intended to provide information (such as type hints) for developers, tools, and static analyzers, without affecting runtime semantics.

@pietern pietern merged commit 8fe05d9 into main Mar 13, 2025
13 of 14 checks passed
@pietern pietern deleted the python-clarify-mutator-order branch March 13, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants