Would it be possible for scope info to resolve imports or perhaps have some example in docs how to handle imports.
For example I would like to have a rule that matches:
ast.Name or ast.Attribute and map it to ful name.
from marshamallow import Schema
from marshamallow import schema
import marshmallow
import marshmallow as mmm
from marshamallow import schema as xxxx
Schema -> marshmallow.Schema
schema.Schema -> marshmallow.schema.Schema
marshmallow.Schema -> marshmallow.Schema
mmm.Schema -> marshmallow.Schema
xxxxx.Schema -> marshmallow.Schema
I thought ScopeInfo would get me this information, but it only links to Import or ImportFrom AST.
Would it be possible for scope info to resolve imports or perhaps have some example in docs how to handle imports.
For example I would like to have a rule that matches:
ast.Name or ast.Attribute and map it to ful name.
I thought ScopeInfo would get me this information, but it only links to Import or ImportFrom AST.