rope.contrib.autoimport.defs

Definitions of types for the Autoimport program.

Classes

Source

Describes the source of the package, for sorting purposes.

ModuleInfo

Descriptor of information to get names from a module.

ModuleFile

Descriptor of information to get names from a file using ast.

ModuleCompiled

Descriptor of information to get names using imports.

PackageType

Describes the type of package, to determine how to get the names from it.

NameType

Describes the type of Name for lsp completions. Taken from python lsp server.

Package

Attributes of a package.

Alias

A module alias to be added to the database.

Name

A Name to be added to the database.

PartialName

Partial information of a Name.

SearchResult

Search Result.

Module Contents

class rope.contrib.autoimport.defs.Source(*args, **kwds)

Bases: enum.Enum

Describes the source of the package, for sorting purposes.

PROJECT = 0
MANUAL = 1
BUILTIN = 2
STANDARD = 3
SITE_PACKAGE = 4
UNKNOWN = 5
class rope.contrib.autoimport.defs.ModuleInfo

Bases: NamedTuple

Descriptor of information to get names from a module.

filepath: pathlib.Path | None
modname: str
underlined: bool
process_imports: bool
class rope.contrib.autoimport.defs.ModuleFile

Bases: ModuleInfo

Descriptor of information to get names from a file using ast.

filepath: pathlib.Path
modname: str
underlined: bool
process_imports: bool
class rope.contrib.autoimport.defs.ModuleCompiled

Bases: ModuleInfo

Descriptor of information to get names using imports.

filepath = None
modname: str
underlined: bool
process_imports: bool
class rope.contrib.autoimport.defs.PackageType(*args, **kwds)

Bases: enum.Enum

Describes the type of package, to determine how to get the names from it.

BUILTIN = 0
STANDARD = 1
COMPILED = 2
SINGLE_FILE = 3
class rope.contrib.autoimport.defs.NameType(*args, **kwds)

Bases: Enum

Describes the type of Name for lsp completions. Taken from python lsp server.

Text = 1
Method = 2
Function = 3
Constructor = 4
Field = 5
Variable = 6
Class = 7
Interface = 8
Module = 9
Property = 10
Unit = 11
Value = 12
Enum = 13
Keyword = 14
Snippet = 15
Color = 16
File = 17
Reference = 18
Folder = 19
EnumMember = 20
Constant = 21
Struct = 22
Event = 23
Operator = 24
TypeParameter = 25
class rope.contrib.autoimport.defs.Package

Bases: NamedTuple

Attributes of a package.

name: str
source: Source
path: pathlib.Path | None
type: PackageType
class rope.contrib.autoimport.defs.Alias

Bases: NamedTuple

A module alias to be added to the database.

alias: str
modname: str
class rope.contrib.autoimport.defs.Name

Bases: NamedTuple

A Name to be added to the database.

name: str
modname: str
package: str
source: Source
name_type: NameType
class rope.contrib.autoimport.defs.PartialName

Bases: NamedTuple

Partial information of a Name.

name: str
name_type: NameType
class rope.contrib.autoimport.defs.SearchResult

Bases: NamedTuple

Search Result.

import_statement: str
name: str
source: int
itemkind: int