1
0
forked from VimPlug/jedi

Remove unicode literals from code base

This commit is contained in:
Dave Halter
2020-07-02 10:43:14 +02:00
parent f1366b8a74
commit 5ab351dc8f
29 changed files with 105 additions and 105 deletions

View File

@@ -53,7 +53,7 @@ def create_simple_object(inference_state, obj):
def get_string_value_set(inference_state):
return builtin_from_name(inference_state, u'str').execute_with_values()
return builtin_from_name(inference_state, 'str').execute_with_values()
def load_module(inference_state, dotted_name, **kwargs):

View File

@@ -155,14 +155,14 @@ def create_access_path(inference_state, obj):
def get_api_type(obj):
if inspect.isclass(obj):
return u'class'
return 'class'
elif inspect.ismodule(obj):
return u'module'
return 'module'
elif inspect.isbuiltin(obj) or inspect.ismethod(obj) \
or inspect.ismethoddescriptor(obj) or inspect.isfunction(obj):
return u'function'
return 'function'
# Everything else...
return u'instance'
return 'instance'
class DirectObjectAccess(object):

View File

@@ -57,7 +57,7 @@ class CompiledValue(Value):
).execute_annotation()
try:
self.access_handle.getattr_paths(u'__call__')
self.access_handle.getattr_paths('__call__')
except AttributeError:
return super(CompiledValue, self).py__call__(arguments)
else:
@@ -500,7 +500,7 @@ class CompiledValueFilter(AbstractFilter):
# ``dir`` doesn't include the type names.
if not self.is_instance and needs_type_completions:
for filter in builtin_from_name(self._inference_state, u'type').get_filters():
for filter in builtin_from_name(self._inference_state, 'type').get_filters():
names += filter.values()
return names
@@ -516,11 +516,11 @@ class CompiledValueFilter(AbstractFilter):
docstr_defaults = {
'floating point number': u'float',
'character': u'str',
'integer': u'int',
'dictionary': u'dict',
'string': u'str',
'floating point number': 'float',
'character': 'str',
'integer': 'int',
'dictionary': 'dict',
'string': 'str',
}
@@ -550,7 +550,7 @@ def _parse_function_doc(doc):
# UnboundLocalError for undefined end in last line
debug.dbg('no brackets found - no param')
end = 0
param_str = u''
param_str = ''
else:
# remove square brackets, that show an optional param ( = None)
def change_options(m):
@@ -568,9 +568,9 @@ def _parse_function_doc(doc):
param_str = param_str.replace('-', '_') # see: isinstance.__doc__
# parse return value
r = re.search(u'-[>-]* ', doc[end:end + 7])
r = re.search('-[>-]* ', doc[end:end + 7])
if r is None:
ret = u''
ret = ''
else:
index = end + r.end()
# get result type, which can contain newlines