Remove redundant parentheses

This commit is contained in:
Hugo
2018-01-07 10:40:06 +02:00
parent a7ac647498
commit 8cf708d0d4
41 changed files with 112 additions and 112 deletions
+1 -1
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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):
+1 -1
View File
@@ -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