final import renamings for the new parser package

This commit is contained in:
David Halter
2013-09-06 01:27:07 +04:30
parent 3e217a8270
commit 9eca33f55c
4 changed files with 7 additions and 6 deletions

View File

@@ -125,7 +125,7 @@ def get_names_of_scope(scope, position=None, star_search=True,
This function is used to include names from outer scopes. For example,
when the current scope is function:
>>> from jedi.parsing import Parser
>>> from jedi.parser import Parser
>>> parser = Parser('''
... x = ['a', 'b', 'c']
... def func():

View File

@@ -18,7 +18,7 @@ which is being used in a function definition.
The easiest way to play with this module is to use :class:`parsing.Parser`.
:attr:`parsing.Parser.module` holds an instance of :class:`SubModule`:
>>> from jedi.parsing import Parser
>>> from jedi.parser import Parser
>>> parser = Parser('import os', 'example.py')
>>> submodule = parser.module
>>> submodule
@@ -241,7 +241,7 @@ class Scope(Simple, IsScope):
"""
Get all defined names in this scope.
>>> from jedi.parsing import Parser
>>> from jedi.parser import Parser
>>> parser = Parser('''
... a = x
... b = y

View File

@@ -1,5 +1,5 @@
from jedi.parser import Parser
from jedi import parsing_representation as pr
from jedi.parser import representation as pr
def test_user_statement_on_import():
"""github #285"""

View File

@@ -10,7 +10,8 @@ from .helpers import TestCase, cwd_at
import jedi
from jedi import Script
from jedi import api, parsing
from jedi import api
from jedi.parser import Parser
#jedi.set_debug_function()
@@ -115,7 +116,7 @@ class TestRegression(TestCase):
def test_end_pos(self):
# jedi issue #150
s = "x()\nx( )\nx( )\nx ( )"
parser = parsing.Parser(s)
parser = Parser(s)
for i, s in enumerate(parser.module.statements, 3):
for c in s.get_commands():
self.assertEqual(c.execution.end_pos[1], i)