-
Notifications
You must be signed in to change notification settings - Fork 56
Process ivar fields and friends when introspecting code (wrt C-modules) #904
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #904 +/- ##
==========================================
+ Coverage 93.14% 93.18% +0.04%
==========================================
Files 47 47
Lines 8733 8736 +3
Branches 1600 1601 +1
==========================================
+ Hits 8134 8141 +7
+ Misses 338 336 -2
+ Partials 261 259 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… into 903-ivar-fields-inspect
This comment has been minimized.
This comment has been minimized.
1 similar comment
According to pydoctor_primer, this change doesn't affect pydoctor warnings on a corpus of open source code. ✅ |
I tested the igraph documentation with this PR and I can confirm that At the same time, yes, you are correct, adding an >>> from igraph import Edge
>>> type(Edge.__dict__["index"])
<class 'getset_descriptor'> |
I believe that this descriptor type is exposed publicly as |
Many thanks for your inputs. I’ll look at supporting introspection of property-like types implemented in c extensions in the near future. |
Fixes #903
@ntamas, this fixes the issue you reported lately.
The testing does not explicitely cover C-module, but I'm pretty confident this will do the trick.
If I understand correctly the initial problem, the ivar fields you were trying to use is just a workaround another issue in pydoctor, that is that property defined in C code are not recognized because they don't appear in the
__dict__
attribute of classes. Maybe by usinginspect.getmembers
instead we could fix this issue as well? Tell me what you think, thanks.