Skip to content

conda-mode-find-definitions on constant variable points to class, not the def site #435

@sangwoo-joh

Description

@sangwoo-joh
  • anaconda-mode-server-version: "0.1.15"
  • Emacs version: 28.1
  • Currently using conda-mode from doomemacs (doom version: 7a7503045850ea83f205de6e71e6d886187f4a22)

Description

If I have a constant.py file like below:

CONST_A = 1

, and other module that use this module like below:

from my_package import constant

foo = constant.CONST_A + 1

With this setting, when I call conda-mode-find-definitions on const.CONST_A, it gave me the following:

...
class int:
    @overload
    ....

... which is in anaconda/0.1.15-py3/jedi/third_party/typeshed/stdlib/3/builtins.pyi.

I though it would jump to the actual definition site in constant.py file...
Other definitions, e.g., some user-defined class, go to the proper def-site. Only builtin types gave me strange location.

What should I do to make it give me the actual def-site? Is there any variable to set up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions