Skip to content

(Closes #3328) fixes duplicated nodes in definition use chains#3353

Open
LonelyCat124 wants to merge 4 commits intomasterfrom
3328_fix
Open

(Closes #3328) fixes duplicated nodes in definition use chains#3353
LonelyCat124 wants to merge 4 commits intomasterfrom
3328_fix

Conversation

@LonelyCat124
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (a7b7d27) to head (4a6a17f).
⚠️ Report is 38 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3353   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         384      384           
  Lines       54271    54275    +4     
=======================================
+ Hits        54249    54253    +4     
  Misses         22       22           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LonelyCat124
Copy link
Collaborator Author

This reminds me I wanted to do type hints for this file so I'll check that before this is ready for review.

@LonelyCat124
Copy link
Collaborator Author

@arporter @sergisiso Ready for a review, once this is in I might look at martin's PR and try to extend that to also support improved start_point/stop_point logic.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

Looks good @LonelyCat124, only a couple of very minor comments.

stop_point=None,
reference: Reference,
control_flow_region: Iterable[Node] = (),
start_point: int = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional[int] if these 2 can be None

# We will only ever reach a reference once, so
# we don't need to check uniqueness.
self._reaches.append(ref)
# We need to check for uniqueness
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you expand this a bit, it was not clear to me at first look. Maybe: "# Add node to the _reaches list if it is not already there (note that a "not in" check is not enough because the references are equal, but this needs identity uniqueness)"

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.

2 participants