forked from VimPlug/jedi
Remove redundant parentheses
This commit is contained in:
@@ -132,7 +132,7 @@ def find_module_pre_py33(string, path=None, fullname=None):
|
||||
file = None
|
||||
if not is_package or is_archive:
|
||||
file = DummyFile(loader, string)
|
||||
return (file, module_path, is_package)
|
||||
return file, module_path, is_package
|
||||
except ImportError:
|
||||
pass
|
||||
raise ImportError("No module named {}".format(string))
|
||||
|
||||
+1
-1
@@ -555,7 +555,7 @@ class Definition(BaseDefinition):
|
||||
.. todo:: Add full path. This function is should return a
|
||||
`module.class.function` path.
|
||||
"""
|
||||
position = '' if self.in_builtin_module else '@%s' % (self.line)
|
||||
position = '' if self.in_builtin_module else '@%s' % self.line
|
||||
return "%s:%s%s" % (self.module_name, self.description, position)
|
||||
|
||||
@memoize_method
|
||||
|
||||
@@ -432,7 +432,7 @@ def dotted_from_fs_path(fs_path, sys_path):
|
||||
# C:\path\to\Lib
|
||||
path = ''
|
||||
for s in sys_path:
|
||||
if (fs_path.startswith(s) and len(path) < len(s)):
|
||||
if fs_path.startswith(s) and len(path) < len(s):
|
||||
path = s
|
||||
|
||||
# - Window
|
||||
|
||||
@@ -87,7 +87,7 @@ else:
|
||||
return getattr(klass, '__dict__', _sentinel)
|
||||
return _shadowed_dict_newstyle(klass)
|
||||
|
||||
class _OldStyleClass():
|
||||
class _OldStyleClass:
|
||||
pass
|
||||
|
||||
_oldstyle_instance_type = type(_OldStyleClass())
|
||||
@@ -122,7 +122,7 @@ def _safe_hasattr(obj, name):
|
||||
|
||||
|
||||
def _safe_is_data_descriptor(obj):
|
||||
return (_safe_hasattr(obj, '__set__') or _safe_hasattr(obj, '__delete__'))
|
||||
return _safe_hasattr(obj, '__set__') or _safe_hasattr(obj, '__delete__')
|
||||
|
||||
|
||||
def getattr_static(obj, attr, default=_sentinel):
|
||||
|
||||
@@ -64,7 +64,7 @@ class MixedName(compiled.CompiledName):
|
||||
contexts = list(self.infer())
|
||||
if not contexts:
|
||||
# This means a start_pos that doesn't exist (compiled objects).
|
||||
return (0, 0)
|
||||
return 0, 0
|
||||
return contexts[0].name.start_pos
|
||||
|
||||
@start_pos.setter
|
||||
|
||||
Reference in New Issue
Block a user