-
-
Notifications
You must be signed in to change notification settings - Fork 313
Implement equality constraint #2927
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
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2927 +/- ##
==========================================
+ Coverage 93.29% 93.31% +0.01%
==========================================
Files 92 92
Lines 11266 11292 +26
==========================================
+ Hits 10511 10537 +26
Misses 755 755
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
|
The referenced issues are no longer flagged by pylint, probably due to the use of |
2a290ff to
bbe78f4
Compare
DanielNoord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacobtylerwalls Do you have time to review this? I consider you domain expert on the constraints.
It LGTM, but I might be missing something.
Thanks @zenlyj for this PR!
jacobtylerwalls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks π
I was sitting on this one for a bit because I thought I might resuscitate my effort to adding a github workflow to run the pylint primer on astroid PRs, but I just didn't get there yet.
bbe78f4 to
3bb8317
Compare
jacobtylerwalls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks π, just a teeny polish question.
| y #@ | ||
| """) | ||
|
|
||
| for node in (node1, node2, node3, node4): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a pytest-idiomatic way to show the node that failed in the assertion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually add info about the node in the assert message when doing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
65ea115 to
3536542
Compare
for more information, see https://pre-commit.ci
jacobtylerwalls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!

Type of Changes
Description
Add a new
EqualityConstraintto support narrowing of inferred values based on equality (==) and inequality (!=) comparisons.The constraint currently handles:
Refs
pylint-dev/pylint#3632
pylint-dev/pylint#3633