Skip to content

Add type key to found occurence.#914

Merged
diraol merged 1 commit intopython-mode:developfrom
boatx:bugfix/fix_finding_occurrences
Jul 23, 2018
Merged

Add type key to found occurence.#914
diraol merged 1 commit intopython-mode:developfrom
boatx:bugfix/fix_finding_occurrences

Conversation

@boatx
Copy link
Copy Markdown

@boatx boatx commented Jul 1, 2018

Pressing C-c f results in IndexError because found occurrence dictionary don't have key 'type' (required by g:PymodeLocList.extend).

Related issue #921

Explanation related to the fix retrieved from the related issue:

This error is related to PymodeLocList. It is used to display places in code where rope has found occurences.

let loclist = g:PymodeLocList.current()

But it is also (or mostly used) by linters to display line of code with error of warnings (type 'E' or 'W'), when list of locations is extended new entries are filtered over type.

let err_list = filter(copy(a:raw_list), 'v:val["type"] == "E"')

This type is later displayed next to line number. I wasn't sure what to put for rope so I've added empty string.

@120318
Copy link
Copy Markdown

120318 commented Jul 23, 2018

It
works fine

@diraol diraol merged commit 770a8ff into python-mode:develop Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants