Path 1: 166 calls (0.53)

AssignName (125) Import (16) FunctionDef (13) ImportFrom (9) ClassDef (2) AsyncFunctionDef (1)

FunctionDef (163) AsyncFunctionDef (3)

False (166)

1def _has_locals_call_after_node(stmt: nodes.NodeNG, scope: nodes.FunctionDef) -> bool:
2    skip_nodes = (
3        nodes.FunctionDef,
4        nodes.ClassDef,
5        nodes.Import,
6        nodes.ImportFrom,
7    )
8    for call in scope.nodes_of_class(nodes.Call, skip_klass=skip_nodes):
9        inferred = utils.safe_infer(call.func)
10        if (
11            utils.is_builtin_object(inferred)
12            and getattr(inferred, "name", None) == "locals"
13        ):
14            if stmt.lineno < call.lineno:
15                return True
16    return False
            

Path 2: 111 calls (0.35)

AssignName (110) FunctionDef (1)

FunctionDef (110) AsyncFunctionDef (1)

False (111)

1def _has_locals_call_after_node(stmt: nodes.NodeNG, scope: nodes.FunctionDef) -> bool:
2    skip_nodes = (
3        nodes.FunctionDef,
4        nodes.ClassDef,
5        nodes.Import,
6        nodes.ImportFrom,
7    )
8    for call in scope.nodes_of_class(nodes.Call, skip_klass=skip_nodes):
9        inferred = utils.safe_infer(call.func)
10        if (
11            utils.is_builtin_object(inferred)
12            and getattr(inferred, "name", None) == "locals"
13        ):
14            if stmt.lineno < call.lineno:
15                return True
16    return False
            

Path 3: 36 calls (0.11)

AssignName (36)

FunctionDef (35) AsyncFunctionDef (1)

False (36)

1def _has_locals_call_after_node(stmt: nodes.NodeNG, scope: nodes.FunctionDef) -> bool:
2    skip_nodes = (
3        nodes.FunctionDef,
4        nodes.ClassDef,
5        nodes.Import,
6        nodes.ImportFrom,
7    )
8    for call in scope.nodes_of_class(nodes.Call, skip_klass=skip_nodes):
9        inferred = utils.safe_infer(call.func)
10        if (
11            utils.is_builtin_object(inferred)
12            and getattr(inferred, "name", None) == "locals"
13        ):
14            if stmt.lineno < call.lineno:
15                return True
16    return False
            

Path 4: 1 calls (0.0)

AssignName (1)

FunctionDef (1)

True (1)

1def _has_locals_call_after_node(stmt: nodes.NodeNG, scope: nodes.FunctionDef) -> bool:
2    skip_nodes = (
3        nodes.FunctionDef,
4        nodes.ClassDef,
5        nodes.Import,
6        nodes.ImportFrom,
7    )
8    for call in scope.nodes_of_class(nodes.Call, skip_klass=skip_nodes):
9        inferred = utils.safe_infer(call.func)
10        if (
11            utils.is_builtin_object(inferred)
12            and getattr(inferred, "name", None) == "locals"
13        ):
14            if stmt.lineno < call.lineno:
15                return True
16    return False
            

Path 5: 1 calls (0.0)

AssignName (1)

FunctionDef (1)

False (1)

1def _has_locals_call_after_node(stmt: nodes.NodeNG, scope: nodes.FunctionDef) -> bool:
2    skip_nodes = (
3        nodes.FunctionDef,
4        nodes.ClassDef,
5        nodes.Import,
6        nodes.ImportFrom,
7    )
8    for call in scope.nodes_of_class(nodes.Call, skip_klass=skip_nodes):
9        inferred = utils.safe_infer(call.func)
10        if (
11            utils.is_builtin_object(inferred)
12            and getattr(inferred, "name", None) == "locals"
13        ):
14            if stmt.lineno < call.lineno:
15                return True
16    return False