Lines Matching refs:self

118         def delete(self):
252 def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
254 self.globals["range"] = safe_range
255 self.binop_table = self.default_binop_table.copy()
256 self.unop_table = self.default_unop_table.copy()
258 def is_safe_attribute(self, obj: t.Any, attr: str, value: t.Any) -> bool:
267 def is_safe_callable(self, obj: t.Any) -> bool:
279 self, context: Context, operator: str, left: t.Any, right: t.Any
287 return self.binop_table[operator](left, right)
289 def call_unop(self, context: Context, operator: str, arg: t.Any) -> t.Any:
296 return self.unop_table[operator](arg)
299 self, obj: t.Any, argument: t.Union[str, t.Any]
316 if self.is_safe_attribute(obj, argument, value):
318 return self.unsafe_undefined(obj, argument)
319 return self.undefined(obj=obj, name=argument)
321 def getattr(self, obj: t.Any, attribute: str) -> t.Union[t.Any, Undefined]:
333 if self.is_safe_attribute(obj, attribute, value):
335 return self.unsafe_undefined(obj, attribute)
336 return self.undefined(obj=obj, name=attribute)
338 def unsafe_undefined(self, obj: t.Any, attribute: str) -> Undefined:
340 return self.undefined(
349 self,
360 formatter = SandboxedEscapeFormatter(self, escape=s.escape)
362 formatter = SandboxedFormatter(self)
402 def is_safe_attribute(self, obj: t.Any, attr: str, value: t.Any) -> bool:
410 def __init__(self, env: Environment, **kwargs: t.Any) -> None:
411 self._env = env
415 self, field_name: str, args: t.Sequence[t.Any], kwargs: t.Mapping[str, t.Any]
418 obj = self.get_value(first, args, kwargs)
421 obj = self._env.getattr(obj, i)
423 obj = self._env.getitem(obj, i)