Skip to content

developer guide for inference #670

Open
@kodonnell

Description

@kodonnell

I'm trying to learn more about astroid - in particular inference - so I can (try to) help speed things up. However, I can't seem to find any higher level discussion of what's going on (e.g. "why do we need contexts? call contexts? why is the cache key (...)?" etc.). This issue is to request that this be provided in a "developer/contributors guide", along with maybe some examples of particular points (e.g. why we need callcontext or context cloning). And maybe a step-by-step of how an example inference actually works (each step being a different node inference, etc.). The inclusion of some descriptions of known faults/potential improvements with the current context approach might be valuable too.

The benefit from resolving this issue (aside from general niceness) may be increased contributions from the community (e.g. me). The downside may be higher overhead to maintain the docs (if the general inferencing approach changes frequently).

FYI while I have looked at the code, and while I'm not familiar with ASTs etc., I like to think I'm reasonably python savvy, and it's taking a while to understand what's going on. I think this is largely because I'm missing some key understandings (as above) and simple examples, as opposed to the code itself being confusing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions