rope.refactor.importutils.importinfo
Classes
Represent an import in a module |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Module Contents
- class rope.refactor.importutils.importinfo.ImportStatement(import_info, start_line, end_line, main_statement=None, blank_lines=0)
Represent an import in a module
readonly attribute controls whether this import can be changed by import actions or not.
- start_line
- end_line
- readonly = False
- main_statement = None
- import_info
- new_start = None
- blank_lines = 0
- get_import_statement()
- empty_import()
- move(lineno, blank_lines=0)
- get_old_location()
- get_new_start()
- is_changed()
- accept(visitor)
- class rope.refactor.importutils.importinfo.ImportInfo
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- get_imported_names(context)
- is_empty()
- static get_empty_import()
- class rope.refactor.importutils.importinfo.NormalImport(names_and_aliases: List[Tuple[str, str | None]])
Bases:
ImportInfoHelper class that provides a standard way to create an ABC using inheritance.
- names_and_aliases
- is_empty()
- get_imported_names(context)
- static get_empty_import()
- class rope.refactor.importutils.importinfo.FromImport(module_name: str, level: int, names_and_aliases: List[Tuple[str, str | None]])
Bases:
ImportInfoHelper class that provides a standard way to create an ABC using inheritance.
- names_and_aliases
- get_imported_resource(context)
Get the imported resource
Returns None if module was not found.
- get_imported_module(context)
Get the imported PyModule
Raises rope.base.exceptions.ModuleNotFoundError if module could not be found.
- is_empty()
- is_star_import()
- get_imported_names(context)
- static get_empty_import()