rope.contrib.autoimport.defs ============================ .. py:module:: rope.contrib.autoimport.defs .. autoapi-nested-parse:: Definitions of types for the Autoimport program. Classes ------- .. autoapisummary:: rope.contrib.autoimport.defs.Source rope.contrib.autoimport.defs.ModuleInfo rope.contrib.autoimport.defs.ModuleFile rope.contrib.autoimport.defs.ModuleCompiled rope.contrib.autoimport.defs.PackageType rope.contrib.autoimport.defs.NameType rope.contrib.autoimport.defs.Package rope.contrib.autoimport.defs.Alias rope.contrib.autoimport.defs.Name rope.contrib.autoimport.defs.PartialName rope.contrib.autoimport.defs.SearchResult Module Contents --------------- .. py:class:: Source(*args, **kwds) Bases: :py:obj:`enum.Enum` Describes the source of the package, for sorting purposes. .. py:attribute:: PROJECT :value: 0 .. py:attribute:: MANUAL :value: 1 .. py:attribute:: BUILTIN :value: 2 .. py:attribute:: STANDARD :value: 3 .. py:attribute:: SITE_PACKAGE :value: 4 .. py:attribute:: UNKNOWN :value: 5 .. py:class:: ModuleInfo Bases: :py:obj:`NamedTuple` Descriptor of information to get names from a module. .. py:attribute:: filepath :type: Optional[pathlib.Path] .. py:attribute:: modname :type: str .. py:attribute:: underlined :type: bool .. py:attribute:: process_imports :type: bool .. py:class:: ModuleFile Bases: :py:obj:`ModuleInfo` Descriptor of information to get names from a file using ast. .. py:attribute:: filepath :type: pathlib.Path .. py:attribute:: modname :type: str .. py:attribute:: underlined :type: bool .. py:attribute:: process_imports :type: bool .. py:class:: ModuleCompiled Bases: :py:obj:`ModuleInfo` Descriptor of information to get names using imports. .. py:attribute:: filepath :value: None .. py:attribute:: modname :type: str .. py:attribute:: underlined :type: bool .. py:attribute:: process_imports :type: bool .. py:class:: PackageType(*args, **kwds) Bases: :py:obj:`enum.Enum` Describes the type of package, to determine how to get the names from it. .. py:attribute:: BUILTIN :value: 0 .. py:attribute:: STANDARD :value: 1 .. py:attribute:: COMPILED :value: 2 .. py:attribute:: SINGLE_FILE :value: 3 .. py:class:: NameType(*args, **kwds) Bases: :py:obj:`Enum` Describes the type of Name for lsp completions. Taken from python lsp server. .. py:attribute:: Text :value: 1 .. py:attribute:: Method :value: 2 .. py:attribute:: Function :value: 3 .. py:attribute:: Constructor :value: 4 .. py:attribute:: Field :value: 5 .. py:attribute:: Variable :value: 6 .. py:attribute:: Class :value: 7 .. py:attribute:: Interface :value: 8 .. py:attribute:: Module :value: 9 .. py:attribute:: Property :value: 10 .. py:attribute:: Unit :value: 11 .. py:attribute:: Value :value: 12 .. py:attribute:: Enum :value: 13 .. py:attribute:: Keyword :value: 14 .. py:attribute:: Snippet :value: 15 .. py:attribute:: Color :value: 16 .. py:attribute:: File :value: 17 .. py:attribute:: Reference :value: 18 .. py:attribute:: Folder :value: 19 .. py:attribute:: EnumMember :value: 20 .. py:attribute:: Constant :value: 21 .. py:attribute:: Struct :value: 22 .. py:attribute:: Event :value: 23 .. py:attribute:: Operator :value: 24 .. py:attribute:: TypeParameter :value: 25 .. py:class:: Package Bases: :py:obj:`NamedTuple` Attributes of a package. .. py:attribute:: name :type: str .. py:attribute:: source :type: Source .. py:attribute:: path :type: Optional[pathlib.Path] .. py:attribute:: type :type: PackageType .. py:class:: Alias Bases: :py:obj:`NamedTuple` A module alias to be added to the database. .. py:attribute:: alias :type: str .. py:attribute:: modname :type: str .. py:class:: Name Bases: :py:obj:`NamedTuple` A Name to be added to the database. .. py:attribute:: name :type: str .. py:attribute:: modname :type: str .. py:attribute:: package :type: str .. py:attribute:: source :type: Source .. py:attribute:: name_type :type: NameType .. py:class:: PartialName Bases: :py:obj:`NamedTuple` Partial information of a Name. .. py:attribute:: name :type: str .. py:attribute:: name_type :type: NameType .. py:class:: SearchResult Bases: :py:obj:`NamedTuple` Search Result. .. py:attribute:: import_statement :type: str .. py:attribute:: name :type: str .. py:attribute:: source :type: int .. py:attribute:: itemkind :type: int