Lines Matching refs:str
26 UNSAFE_FUNCTION_ATTRIBUTES: t.Set[str] = set()
29 UNSAFE_METHOD_ATTRIBUTES: t.Set[str] = set()
40 _mutable_spec: t.Tuple[t.Tuple[t.Type, t.FrozenSet[str]], ...] = (
83 def inspect_format_method(callable: t.Callable) -> t.Optional[str]:
91 if isinstance(obj, str):
125 def is_internal_attribute(obj: t.Any, attr: str) -> bool:
132 >>> is_internal_attribute(str, "mro")
134 >>> is_internal_attribute(str, "upper")
162 def modifies_known_mutable(obj: t.Any, attr: str) -> bool:
203 default_binop_table: t.Dict[str, t.Callable[[t.Any, t.Any], t.Any]] = {
216 default_unop_table: t.Dict[str, t.Callable[[t.Any], t.Any]] = {
235 intercepted_binops: t.FrozenSet[str] = frozenset()
250 intercepted_unops: t.FrozenSet[str] = frozenset()
258 def is_safe_attribute(self, obj: t.Any, attr: str, value: t.Any) -> bool:
279 self, context: Context, operator: str, left: t.Any, right: t.Any
289 def call_unop(self, context: Context, operator: str, arg: t.Any) -> t.Any:
299 self, obj: t.Any, argument: t.Union[str, t.Any]
305 if isinstance(argument, str):
307 attr = str(argument)
321 def getattr(self, obj: t.Any, attribute: str) -> t.Union[t.Any, Undefined]:
338 def unsafe_undefined(self, obj: t.Any, attribute: str) -> Undefined:
350 s: str,
352 kwargs: t.Dict[str, t.Any],
354 ) -> str:
402 def is_safe_attribute(self, obj: t.Any, attr: str, value: t.Any) -> bool:
415 self, field_name: str, args: t.Sequence[t.Any], kwargs: t.Mapping[str, t.Any]
416 ) -> t.Tuple[t.Any, str]: