1
0
forked from VimPlug/jedi

Remove super arguments

This commit is contained in:
Dave Halter
2020-07-02 10:59:59 +02:00
parent 216ce8726c
commit a0de93a638
19 changed files with 67 additions and 68 deletions

View File

@@ -797,8 +797,8 @@ class Interpreter(Script):
if not isinstance(environment, InterpreterEnvironment):
raise TypeError("The environment needs to be an InterpreterEnvironment subclass.")
super(Interpreter, self).__init__(code, environment=environment,
project=Project(os.getcwd()), **kwds)
super().__init__(code, environment=environment,
project=Project(os.getcwd()), **kwds)
self.namespaces = namespaces
self._inference_state.allow_descriptor_getattr = self._allow_descriptor_getattr_default

View File

@@ -635,7 +635,7 @@ class Completion(BaseName):
"""
def __init__(self, inference_state, name, stack, like_name_length,
is_fuzzy, cached_name=None):
super(Completion, self).__init__(inference_state, name)
super().__init__(inference_state, name)
self._like_name_length = like_name_length
self._stack = stack
@@ -706,7 +706,7 @@ class Completion(BaseName):
# wouldn't load like > 100 Python modules anymore.
fast = False
return super(Completion, self).docstring(raw=raw, fast=fast)
return super().docstring(raw=raw, fast=fast)
def _get_docstring(self):
if self._cached_name is not None:
@@ -715,7 +715,7 @@ class Completion(BaseName):
self._name.get_public_name(),
lambda: self._get_cache()
)
return super(Completion, self)._get_docstring()
return super()._get_docstring()
def _get_docstring_signature(self):
if self._cached_name is not None:
@@ -724,13 +724,13 @@ class Completion(BaseName):
self._name.get_public_name(),
lambda: self._get_cache()
)
return super(Completion, self)._get_docstring_signature()
return super()._get_docstring_signature()
def _get_cache(self):
return (
super(Completion, self).type,
super(Completion, self)._get_docstring_signature(),
super(Completion, self)._get_docstring(),
super().type,
super()._get_docstring_signature(),
super()._get_docstring(),
)
@property
@@ -746,7 +746,7 @@ class Completion(BaseName):
lambda: self._get_cache()
)
return super(Completion, self).type
return super().type
def __repr__(self):
return '<%s: %s>' % (type(self).__name__, self._name.get_public_name())
@@ -758,7 +758,7 @@ class Name(BaseName):
:meth:`.Script.goto` or :meth:`.Script.infer`.
"""
def __init__(self, inference_state, definition):
super(Name, self).__init__(inference_state, definition)
super().__init__(inference_state, definition)
@property
def desc_with_module(self):
@@ -811,7 +811,7 @@ class BaseSignature(Name):
calls.
"""
def __init__(self, inference_state, signature):
super(BaseSignature, self).__init__(inference_state, signature.name)
super().__init__(inference_state, signature.name)
self._signature = signature
@property
@@ -841,7 +841,7 @@ class Signature(BaseSignature):
:meth:`.Script.get_signatures`.
"""
def __init__(self, inference_state, signature, call_details):
super(Signature, self).__init__(inference_state, signature)
super().__init__(inference_state, signature)
self._call_details = call_details
self._signature = signature

View File

@@ -21,7 +21,7 @@ class NamespaceObject(object):
class MixedModuleContext(ModuleContext):
def __init__(self, tree_module_value, namespaces):
super(MixedModuleContext, self).__init__(tree_module_value)
super().__init__(tree_module_value)
self._namespace_objects = [NamespaceObject(n) for n in namespaces]
def _get_mixed_object(self, compiled_value):