-
-
Notifications
You must be signed in to change notification settings - Fork 276
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 AssertionError when inferring a property consisting of a partial function #2458
Conversation
…function. Closes pylint-dev/pylint#9214 Thanks Martin Belanger for the report and Bryce Guinta for the test case.
@@ -2518,6 +2518,10 @@ def igetattr( | |||
elif isinstance(inferred, objects.Property): | |||
function = inferred.function | |||
if not class_context: | |||
if not context.callcontext: |
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.
We may have the identical problem just below this, but I'm hesitant to just add it without a test case in hand. One thing at a time :-)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2458 +/- ##
=======================================
Coverage 92.74% 92.74%
=======================================
Files 94 94
Lines 10993 10995 +2
=======================================
+ Hits 10195 10197 +2
Misses 798 798
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…function. (#2458) Closes pylint-dev/pylint#9214 Thanks Martin Belanger for the report and Bryce Guinta for the test case. (cherry picked from commit 0f9dfa6)
…function. (#2458) Closes pylint-dev/pylint#9214 Thanks Martin Belanger for the report and Bryce Guinta for the test case. (cherry picked from commit 0f9dfa6)
…function. (#2458) (#2460) Closes pylint-dev/pylint#9214 Thanks Martin Belanger for the report and Bryce Guinta for the test case. (cherry picked from commit 0f9dfa6) Co-authored-by: Jacob Walls <[email protected]>
Nice! deceptively straightforward :) |
Type of Changes
Description
Closes pylint-dev/pylint#9214
Thanks Martin Belanger for the report and Bryce Guinta for the test case.
@brycepg would you like to review?