Skip to content

Commit e4faecf

Browse files
committed
Use codeql.util.Boolean
1 parent 8bac259 commit e4faecf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • python/ql/lib/semmle/python/frameworks/Stdlib

‎python/ql/lib/semmle/python/frameworks/Stdlib/Urllib.qll‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ private import python
1111
private import semmle.python.Concepts
1212
private import semmle.python.ApiGraphs
1313
private import semmle.python.security.dataflow.UrlRedirectCustomizations
14+
private import codeql.util.Boolean
1415

1516
/**
1617
* Provides models for the `urllib` module, part of
@@ -150,8 +151,7 @@ private module Urllib {
150151
* collection literal used directly in the membership test, with known host elements or keys.
151152
* Empty strings are accepted only when `allowEmpty` is true.
152153
*/
153-
private predicate membershipChecksKnownHosts(Expr e, boolean allowEmpty) {
154-
allowEmpty in [true, false] and
154+
private predicate membershipChecksKnownHosts(Expr e, Boolean allowEmpty) {
155155
forex(DataFlow::LocalSourceNode source | source = DataFlow::exprNode(e).getALocalSource() |
156156
exists(Expr collection | collection = source.asExpr() |
157157
(collection instanceof List or collection instanceof Tuple or collection instanceof Set) and

0 commit comments

Comments
 (0)