-
Notifications
You must be signed in to change notification settings - Fork 305
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
Prevent mutable default arguments #2443
Conversation
Signed-off-by: Eduardo Apolinario <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2443 +/- ##
===========================================
- Coverage 89.99% 75.90% -14.09%
===========================================
Files 45 182 +137
Lines 1919 18472 +16553
Branches 0 3610 +3610
===========================================
+ Hits 1727 14022 +12295
- Misses 192 3846 +3654
- Partials 0 604 +604 ☔ View full report in Codecov by Sentry. |
need to fix tho |
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
de87986
…guments Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
* Prevent mutable default arguments Signed-off-by: Eduardo Apolinario <[email protected]> * Do not lint tests Signed-off-by: Eduardo Apolinario <[email protected]> * Bump precommit hook version Signed-off-by: Eduardo Apolinario <[email protected]> * Remove default value for dictionary in Spark class Signed-off-by: Eduardo Apolinario <[email protected]> * Run precommit hook locally Signed-off-by: Eduardo Apolinario <[email protected]> * Fix lint error in openai plugin Signed-off-by: Eduardo Apolinario <[email protected]> * Handle nil databricks_conf in spark plugin Signed-off-by: Eduardo Apolinario <[email protected]> --------- Signed-off-by: Eduardo Apolinario <[email protected]> Co-authored-by: Eduardo Apolinario <[email protected]> Signed-off-by: bugra.gedik <[email protected]>
* Prevent mutable default arguments Signed-off-by: Eduardo Apolinario <[email protected]> * Do not lint tests Signed-off-by: Eduardo Apolinario <[email protected]> * Bump precommit hook version Signed-off-by: Eduardo Apolinario <[email protected]> * Remove default value for dictionary in Spark class Signed-off-by: Eduardo Apolinario <[email protected]> * Run precommit hook locally Signed-off-by: Eduardo Apolinario <[email protected]> * Fix lint error in openai plugin Signed-off-by: Eduardo Apolinario <[email protected]> * Handle nil databricks_conf in spark plugin Signed-off-by: Eduardo Apolinario <[email protected]> --------- Signed-off-by: Eduardo Apolinario <[email protected]> Co-authored-by: Eduardo Apolinario <[email protected]> Signed-off-by: Jan Fiedler <[email protected]>
Why are the changes needed?
Mutable default arguments are an anti-pattern in python. Let's catch that via a lint rule.
What changes were proposed in this pull request?
Enable https://docs.astral.sh/ruff/rules/mutable-argument-default/ in ruff.
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link