beniget
beniget copied to clipboard
Support standard library (Attempt 3)
This attempt uses the pkg()
function proposed in #101.
This changes should probably be squashed since a lot of the commit messages are irrelevant.
For the record:
- Attempt 1 was comparing the type as strings with
if node.__class__.__name__ == <str>
. - Attempt 2 was dynamically determining the origin
ast
module only at strategics place and then storing it in aself.ast
variable. - Now we're dynamically determining the origin module on the fly when needed.
But in any case some methods needs to be added to the DefUseChains
class and a couple of places needs to be adjusted to cope with structural differences in between ast and gast, for instance the fact that expect handlers name are stored as Name
instead of str
and arg
doesn't exist in gast
.