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

@@ -53,7 +53,7 @@ class FunctionAndClassBase(TreeValue):
return None
class FunctionMixin(object):
class FunctionMixin:
api_type = 'function'
def get_filters(self, origin_scope=None):

View File

@@ -19,7 +19,7 @@ from jedi.inference.context import CompForContext
from jedi.inference.value.dynamic_arrays import check_array_additions
class IterableMixin(object):
class IterableMixin:
def py__next__(self, contextualized_node=None):
return self.py__iter__(contextualized_node)
@@ -127,7 +127,7 @@ def comprehension_from_atom(inference_state, value, atom):
)
class ComprehensionMixin(object):
class ComprehensionMixin:
@inference_state_method_cache()
def _get_comp_for_context(self, parent_context, comp_for):
return CompForContext(parent_context, comp_for)
@@ -175,7 +175,7 @@ class ComprehensionMixin(object):
return "<%s of %s>" % (type(self).__name__, self._sync_comp_for_node)
class _DictMixin(object):
class _DictMixin:
def _get_generics(self):
return tuple(c_set.py__class__() for c_set in self.get_mapping_item_values())
@@ -247,7 +247,7 @@ class GeneratorComprehension(_BaseComprehension, GeneratorBase):
pass
class _DictKeyMixin(object):
class _DictKeyMixin:
# TODO merge with _DictMixin?
def get_mapping_item_values(self):
return self._dict_keys(), self._dict_values()

View File

@@ -142,7 +142,7 @@ class ClassFilter(ParserTreeFilter):
return [name for name in names if self._access_possible(name)]
class ClassMixin(object):
class ClassMixin:
def is_class(self):
return True

View File

@@ -34,7 +34,7 @@ class _ModuleAttributeName(AbstractNameDefinition):
return compiled.get_string_value_set(self.parent_context.inference_state)
class SubModuleDictMixin(object):
class SubModuleDictMixin:
@inference_state_method_cache()
def sub_modules_dict(self):
"""