1
0
forked from VimPlug/jedi

Remove the u() unicode function

This commit is contained in:
Dave Halter
2020-07-02 10:35:39 +02:00
parent 7f67324210
commit f1366b8a74
7 changed files with 27 additions and 42 deletions

View File

@@ -438,13 +438,12 @@ def get_global_filters(context, until_position, origin_scope):
For global name lookups. The filters will handle name resolution
themselves, but here we gather possible filters downwards.
>>> from jedi._compatibility import u
>>> from jedi import Script
>>> script = Script(u('''
>>> script = Script('''
... x = ['a', 'b', 'c']
... def func():
... y = None
... '''))
... ''')
>>> module_node = script._module_node
>>> scope = next(module_node.iter_funcdefs())
>>> scope

View File

@@ -21,7 +21,6 @@ from textwrap import dedent
from parso import parse, ParserSyntaxError
from jedi._compatibility import u
from jedi import debug
from jedi.common import indent_block
from jedi.inference.cache import inference_state_method_cache
@@ -184,7 +183,7 @@ def _strip_rst_role(type_str):
def _infer_for_statement_string(module_context, string):
code = dedent(u("""
code = dedent("""
def pseudo_docstring_stuff():
'''
Create a pseudo function for docstring statements.
@@ -192,7 +191,7 @@ def _infer_for_statement_string(module_context, string):
is still a function.
'''
{}
"""))
""")
if string is None:
return []