mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Actually fix #1556, forgot to add this in 94d374c9ce
This commit is contained in:
@@ -13,7 +13,7 @@ from test.helpers import test_dir
|
|||||||
|
|
||||||
collect_ignore = [
|
collect_ignore = [
|
||||||
'setup.py',
|
'setup.py',
|
||||||
'__main__.py',
|
'jedi/__main__.py',
|
||||||
'jedi/inference/compiled/subprocess/__main__.py',
|
'jedi/inference/compiled/subprocess/__main__.py',
|
||||||
'build/',
|
'build/',
|
||||||
'test/examples',
|
'test/examples',
|
||||||
|
|||||||
@@ -472,7 +472,7 @@ class Script(object):
|
|||||||
if definitions:
|
if definitions:
|
||||||
return definitions
|
return definitions
|
||||||
leaf = self._module_node.get_leaf_for_position((line, column))
|
leaf = self._module_node.get_leaf_for_position((line, column))
|
||||||
if leaf.type in ('keyword', 'operator', 'error_leaf'):
|
if leaf is not None and leaf.type in ('keyword', 'operator', 'error_leaf'):
|
||||||
reserved = self._inference_state.grammar._pgen_grammar.reserved_syntax_strings.keys()
|
reserved = self._inference_state.grammar._pgen_grammar.reserved_syntax_strings.keys()
|
||||||
if leaf.value in reserved:
|
if leaf.value in reserved:
|
||||||
name = KeywordName(self._inference_state, leaf.value)
|
name = KeywordName(self._inference_state, leaf.value)
|
||||||
|
|||||||
Reference in New Issue
Block a user