Skip to content
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

Fix: SemanticModel.same_model compares model attribute #9549

Merged
merged 4 commits into from
Feb 10, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Feb 9, 2024

resolves #9548

Problem

  • semantic models were always getting picked up as part of state:modifed because the SemanticModel.same_model was comparing the wrong things to each other (self.model == self.same_model (method)), which always returned false

Solution

  • Fix SemanticModel.same_model to actually compare the right attributes!

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@cla-bot cla-bot bot added the cla:yes label Feb 9, 2024
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f732b76) 87.88% compared to head (e572dbd) 87.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9549      +/-   ##
==========================================
+ Coverage   87.88%   87.96%   +0.07%     
==========================================
  Files         167      167              
  Lines       22170    22170              
==========================================
+ Hits        19485    19501      +16     
+ Misses       2685     2669      -16     
Flag Coverage Δ
integration 85.53% <100.00%> (+0.07%) ⬆️
unit 61.90% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichelleArk MichelleArk marked this pull request as ready for review February 9, 2024 22:49
@MichelleArk MichelleArk requested a review from a team as a code owner February 9, 2024 22:49
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Makes sense! Thank you for finding and fixing this ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] semantic models always included as part of state:modified
2 participants