1
0
forked from VimPlug/jedi

allow_descriptor_getattr -> allow_unsafe_interpreter_executions

This commit is contained in:
Dave Halter
2023-07-29 00:03:45 +02:00
parent 62cbcb0844
commit 8a4b079d0f
5 changed files with 10 additions and 6 deletions

View File

@@ -103,7 +103,7 @@ class InferenceState:
self.is_analysis = False
self.project = project
self.access_cache = {}
self.allow_descriptor_getattr = False
self.allow_unsafe_executions = False
self.flow_analysis_enabled = True
self.reset_recursion_limitations()

View File

@@ -437,7 +437,7 @@ class CompiledValueFilter(AbstractFilter):
def get(self, name):
access_handle = self.compiled_value.access_handle
safe = not self._inference_state.allow_descriptor_getattr
safe = not self._inference_state.allow_unsafe_executions
return self._get(
name,
lambda name: access_handle.is_allowed_getattr(name, safe=safe),
@@ -464,7 +464,7 @@ class CompiledValueFilter(AbstractFilter):
return []
if (is_descriptor or not has_attribute) \
and not self._inference_state.allow_descriptor_getattr:
and not self._inference_state.allow_unsafe_executions:
return [self._get_cached_name(name, is_empty=True)]
if self.is_instance and not in_dir_callback(name):