fix: Use identity check for type comparison and avoid mutable default argument - #6742
harshadkhetpal wants to merge 1 commit into
Conversation
|
@harshadkhetpal Please sign the commit to pass DCO |
49ba95f to
e31ecfa
Compare
|
Gentle ping @ntkathole — this was approved by @shuchu a few weeks back and DCO is green; is there anything left on my side before it can land? Happy to rebase if the branch has drifted. |
… argument Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Harshad Khetpal <harshadkhetpal@users.noreply.github.com>
e31ecfa to
ddfdddd
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6742 +/- ##
=======================================
Coverage 47.18% 47.19%
=======================================
Files 419 419
Lines 51964 51964
Branches 7548 7548
=======================================
+ Hits 24521 24522 +1
Misses 25689 25689
+ Partials 1754 1753 -1
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Summary
Two small lint/correctness fixes:
sdk/python/feast/diff/registry_diff.py—assert type(current_proto) == type(new_proto)compares type objects with==. Newer ruff flags this as E721 (which is inside theE7family this repo selects inpyproject.toml), and identity is the intended semantics for type objects:sdk/python/feast/api/registry/rest/rest_utils.py—validate_or_set_default_sorting_params(sort_by_options: List[str] = [])uses a mutable default argument (ruff B006). Changed to theOptional[...] = Nonesentinel. Behavior is unchanged: the inner dependency only ever checks truthiness (if not sort_by_options:), which treatsNoneand[]identically.Testing
No behavior change —
python -m py_compileandruff check --select E721,B006pass on both files. Theregistry_diff.pychange preserves the file's existing line endings.🤖 Generated with Claude Code