CodeQL queries 1.25
Skip to end of metadata
Go to start of metadata

Find print statements or calls to the builtin function 'print'

import python

from AstNode print
where
  /* Python 2 without `from __future__ import print_function` */
  print instanceof Print
  or
  /* Python 3 or with `from __future__ import print_function` */
  print.(Call).getFunc().pointsTo(Value::named("print"))
select print