New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding "as <anything>" in Python Imports makes "Go to Definition" Fail #1107

Closed
TangoOversway opened this Issue Feb 25, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@TangoOversway

TangoOversway commented Feb 25, 2016

Short Summary

If I have an import of my own Python module written out with "as [anything]" appended, "Go to Definition" will fail. (This was discovered while dealing with issue #1016 about loading imports.)

Steps to Reproduce

  1. Create your own Python module, say, "foo.py" and save it in an editing directory
  2. Make sure the directory containing foo.py is in your additional import path. (Add it to your import paths in Edit > Preferences > Languages > Python > Additional Python Import Directories.)
  3. Create a new Python module, say, "bar.py"
  4. In Bar.py, add "import foo as fu"
  5. Right click on "foo" in the line just created and pick "Go to Definition" in the context menu.

Expected results

This should open foo.py in the Komodo editor, or, if it is open, go to the file in the appropriate tab.

Actual results

Nothing!

If you remove the "as fu" from the end of the line, then it works as expected, but as long as the "as fu" is appended to the import command, "Go to definition" will not work.

Platform Information

Komodo IDE
Build info: Komodo IDE, version 9.3.2, build 88191, platform macosx. Built on Thu Dec 10 13:22:09 2015.
OS X El Capitan 10.11.3

@mitchell-as mitchell-as added this to the 9.3.3 milestone Feb 25, 2016

@mitchell-as mitchell-as self-assigned this Feb 25, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Feb 25, 2016

Thanks so much!

mitchell-as added a commit that referenced this issue Feb 29, 2016

fix: codeintel: Python: "Goto Definition" should work on both module …
…names and aliases - fixes #1107

Previously it only worked on module names or aliases alone, exclusively.

rn=

(integrated from 9.3.x branch change 9.2.1-752-gb6fd31b by Mitchell <mitchellb@activestate.com>)

mitchell-as added a commit that referenced this issue Feb 29, 2016

fix: codeintel: Python: "Goto Definition" should work on both module …
…names and aliases - fixes #1107

Previously it only worked on module names or aliases alone, exclusively.

rn=

Conflicts:
	src/codeintel/lib/codeintel2/tree_python.py

(integrated from 9.3.x branch change 9.2.1-753-g904bea2 by Mitchell <mitchellb@activestate.com>)

mitchell-as added a commit that referenced this issue Feb 29, 2016

fix: codeintel: Python: "Goto Definition" should work on both module …
…names and aliases - fixes #1107

Previously it only worked on module names or aliases alone, exclusively.

rn=

Conflicts:
	src/codeintel/lib/codeintel2/tree_python.py

(integrated from 9.3.x branch change 9.2.1-753-g904bea2 by Mitchell <mitchellb@activestate.com>)
@TangoOversway

This comment has been minimized.

TangoOversway commented Feb 29, 2016

So that fixes it? When will I be able to get an update with this in it?

Thanks!

Hal

On Feb 29, 2016, at 1:45 PM, mitchell notifications@github.com wrote:

Closed #1107 via 1c52ee3.


Reply to this email directly or view it on GitHub.

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Feb 29, 2016

Yes, this will be fixed in the next nightly build that we'll push out in the next few days. Keep your eyes peeled: http://downloads.activestate.com/Komodo/nightly/komodoide/latest-9.3.x/

@TangoOversway

This comment has been minimized.

TangoOversway commented Feb 29, 2016

Thank you!

I thought this was a small enough issue that it’d be rather low priority. (But also figured it’ be an easy fix, too.)

Hal

On Feb 29, 2016, at 3:13 PM, mitchell notifications@github.com wrote:

Yes, this will be fixed in the next nightly build that we'll push out in the next few days. Keep your eyes peeled: http://downloads.activestate.com/Komodo/nightly/komodoide/latest-9.3.x/


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment