-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch mutable default argument #1685
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Eduardo Apolinario <[email protected]>
The expectation is that https://github.com/flyteorg/flytesnacks/actions/runs/9212079968/job/25342931456?pr=1685 will fail. |
As expected, the lint job failed with:
|
Looking into this again, I'm not certain we should enable this in flytesnacks examples by default. I know it propagates an anti-pattern, but at the same time, at least for workflows (and soon tasks too) it's pretty handy to have things like default lists and for the simple case we can't misuse the feature (since the lists won't be modified between task executions). |
Fixes flyteorg/flyte#5383
This PR enables https://docs.astral.sh/ruff/rules/mutable-argument-default/ in the ruff rules.