mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
use set literal instead of big disjunction of literals
This commit is contained in:
@@ -3,11 +3,5 @@ import python
|
||||
from Value val, string name
|
||||
where
|
||||
val = Value::named(name) and
|
||||
(
|
||||
name = "bool" or
|
||||
name = "sys" or
|
||||
name = "sys.argv" or
|
||||
name = "ValueError" or
|
||||
name = "slice"
|
||||
)
|
||||
name in ["bool", "sys", "sys.argv", "ValueError", "slice"]
|
||||
select val, name
|
||||
|
||||
@@ -3,19 +3,7 @@ import python
|
||||
from Object o, string name
|
||||
where
|
||||
o.hasLongName(name) and
|
||||
(
|
||||
name = "sys.modules"
|
||||
or
|
||||
name = "test.n"
|
||||
or
|
||||
name = "test.l"
|
||||
or
|
||||
name = "test.d"
|
||||
or
|
||||
name = "test.C.meth"
|
||||
or
|
||||
name = "test.C.cmeth"
|
||||
or
|
||||
name = "test.C.smeth"
|
||||
)
|
||||
name in [
|
||||
"sys.modules", "test.n", "test.l", "test.d", "test.C.meth", "test.C.cmeth", "test.C.smeth"
|
||||
]
|
||||
select name, o.toString()
|
||||
|
||||
Reference in New Issue
Block a user