Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a80baf

Browse files
authored
python: concession to get the code to compile
`isPackageUsed` now does no filtering
1 parent e54ada1 commit 3a80baf

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ private import AccessPathSyntax
3333
/**
3434
* Holds if models describing `package` may be relevant for the analysis of this database.
3535
*/
36-
predicate isPackageUsed(string package) { exists(API::moduleImport(package)) }
36+
bindingset[package]
37+
predicate isPackageUsed(string package) {
38+
// We would like to ask for imports here,
39+
// but that entails non-monotonic recursion.
40+
// For now, we follow Ruby and just allow all packages.
41+
//
42+
// exists(API::moduleImport(package))
43+
any()
44+
}
3745

3846
/** Gets a Python-specific interpretation of the `(package, type, path)` tuple after resolving the first `n` access path tokens. */
3947
bindingset[package, type, path]

0 commit comments

Comments
 (0)