Files
codeql/python/ql/test/library-tests/PointsTo/version/VersionGuard.ql
2018-11-19 15:15:54 +00:00

9 lines
292 B
Plaintext

import python
import semmle.python.types.Version
from VersionGuard vg, Location l, int v
where l = vg.getLastNode().getLocation() and
l.getFile().getName().matches("%test.py")
and (if vg.isTrue() then v = major_version() else v = 5-major_version())
select l.getStartLine(), vg.toString(), v