Lines Matching defs:ast
165 import ast
355 maybe_fstring = ast.parse(tstring, mode='eval').body
356 if not isinstance(maybe_fstring, ast.JoinedStr):
358 for value in filter(lambda node: isinstance(node, ast.FormattedValue),
360 for call in filter(lambda node: isinstance(node, ast.Call),
361 ast.walk(value)):
363 if isinstance(func, ast.Name):
365 elif isinstance(func, ast.Attribute):
377 'source_segment': ast.get_source_segment(tstring, call) or tstring,
387 'source_segment': ast.get_source_segment(tstring, call) or tstring,
393 if not isinstance(arg, ast.Constant):
398 'source_segment': ast.get_source_segment(tstring, call) or tstring,