Path 1: 10 calls (1.0)

JoinedStr (10)

False (8) True (2)

GeneratorExit (2)

1def str_formatting_in_f_string(node: nodes.JoinedStr) -> bool:
2    """Determine whether the node represents an f-string with string formatting.
3
4    For example: `f'Hello %s'`
5    """
6    # Check "%" presence first for performance.
7    return any(
8        "%" in val.value and any(x in val.value for x in MOST_COMMON_FORMATTING)
9        for val in node.values
10        if isinstance(val, nodes.Const)
11    )