ImportFrom¶
- class astroid.nodes.ImportFrom(fromname: str | None, names: list[tuple[str, str | None]], level: int | None = 0, lineno: int | None = None, col_offset: int | None = None, parent: NodeNG | None = None, *, end_lineno: int | None = None, end_col_offset: int | None = None)[source]¶
Bases:
ImportNode
Class representing an
ast.ImportFrom
node.>>> import astroid >>> node = astroid.extract_node('from my_package import my_module') >>> node <ImportFrom l.1 at 0x7f23b2e415c0>