1
0
forked from VimPlug/jedi

Merge branch 'master' into mypy

This commit is contained in:
Peter Law
2020-07-26 12:25:19 +01:00
35 changed files with 58 additions and 58 deletions

View File

@@ -50,7 +50,7 @@ from jedi.inference.utils import to_list
sys.setrecursionlimit(3000)
class Script(object):
class Script:
"""
A Script is the base for completions, goto or whatever you want to do with
Jedi. The counter part of this class is :class:`Interpreter`, which works

View File

@@ -54,7 +54,7 @@ def _values_to_definitions(values):
return [Name(c.inference_state, c.name) for c in values]
class BaseName(object):
class BaseName:
"""
The base class for all definitions, completions and signatures.
"""

View File

@@ -30,7 +30,7 @@ class InvalidPythonEnvironment(Exception):
"""
class _BaseEnvironment(object):
class _BaseEnvironment:
@memoize_method
def get_grammar(self):
version_string = '%s.%s' % (self.version_info.major, self.version_info.minor)
@@ -121,7 +121,7 @@ class Environment(_BaseEnvironment):
return self._get_subprocess().get_sys_path()
class _SameEnvironmentMixin(object):
class _SameEnvironmentMixin:
def __init__(self):
self._start_executable = self.executable = sys.executable
self.path = sys.prefix

View File

@@ -8,7 +8,7 @@ def parso_to_jedi_errors(grammar, module_node):
return [SyntaxError(e) for e in grammar.iter_errors(module_node)]
class SyntaxError(object):
class SyntaxError:
"""
Syntax errors are generated by :meth:`.Script.get_syntax_errors`.
"""

View File

@@ -203,7 +203,7 @@ def filter_follow_imports(names, follow_builtin_imports=False):
yield name
class CallDetails(object):
class CallDetails:
def __init__(self, bracket_leaf, children, position):
['bracket_leaf', 'call_index', 'keyword_name_str']
self.bracket_leaf = bracket_leaf

View File

@@ -17,7 +17,7 @@ def _create(inference_state, obj):
)
class NamespaceObject(object):
class NamespaceObject:
def __init__(self, dct):
self.__dict__ = dct

View File

@@ -56,7 +56,7 @@ def _remove_duplicates_from_path(path):
yield p
class Project(object):
class Project:
"""
Projects are a simple way to manage Python folders and define how Jedi does
import resolution. It is mostly used as a parameter to :class:`.Script`.

View File

@@ -12,7 +12,7 @@ EXPRESSION_PARTS = (
).split()
class ChangedFile(object):
class ChangedFile:
def __init__(self, inference_state, from_path, to_path,
module_node, node_to_str_map):
self._inference_state = inference_state
@@ -72,7 +72,7 @@ class ChangedFile(object):
return '<%s: %s>' % (self.__class__.__name__, self._from_path)
class Refactoring(object):
class Refactoring:
def __init__(self, inference_state, file_to_node_changes, renames=()):
self._inference_state = inference_state
self._renames = renames