Ignore mypy not coping with decorated properties

This commit is contained in:
Peter Law
2020-07-24 15:50:24 +01:00
parent 07fbcd2262
commit 5e509814f7
4 changed files with 5 additions and 5 deletions

View File

@@ -497,7 +497,7 @@ class BaseName(object):
return [self if n == self._name else Name(self._inference_state, n)
for n in resulting_names]
@property
@property # type: ignore[misc]
@memoize_method
def params(self):
warnings.warn(

View File

@@ -120,14 +120,14 @@ class InferenceState(object):
debug.dbg('execute result: %s in %s', value_set, value)
return value_set
@property
@property # type: ignore[misc]
@inference_state_function_cache()
def builtins_module(self):
module_name = 'builtins'
builtins_module, = self.import_module((module_name,), sys_path=())
return builtins_module
@property
@property # type: ignore[misc]
@inference_state_function_cache()
def typing_module(self):
typing_module, = self.import_module(('typing',))

View File

@@ -80,7 +80,7 @@ class ModuleMixin(SubModuleDictMixin):
def is_stub(self):
return False
@property
@property # type: ignore[misc]
@inference_state_method_cache()
def name(self):
return self._module_name_class(self, self.string_names[-1])

View File

@@ -38,7 +38,7 @@ class ImplicitNamespaceValue(Value, SubModuleDictMixin):
def get_qualified_names(self):
return ()
@property
@property # type: ignore[misc]
@inference_state_method_cache()
def name(self):
string_name = self.py__package__()[-1]