mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
Python: Get rid of points-to from Definitions.qll
Turns out the `ImportTime` module (despite living in `semmle.python.types` does not actually depend on points-to, so some of the `LegacyPointsTo` imports could be replaced or removed.
This commit is contained in:
@@ -32,7 +32,6 @@ import semmle.python.types.FunctionObject
|
||||
import semmle.python.types.ModuleObject
|
||||
import semmle.python.types.Exceptions
|
||||
import semmle.python.types.Properties
|
||||
import semmle.python.types.ImportTime
|
||||
import semmle.python.types.Descriptors
|
||||
import semmle.python.SelfAttribute
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
import IDEContextual
|
||||
|
||||
private newtype TDefinition =
|
||||
|
||||
@@ -11,7 +11,7 @@ import python
|
||||
* Escaping globals -- Global variables that have definitions and at least one of those definitions is in another scope.
|
||||
*/
|
||||
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
private import semmle.python.essa.SsaDefinitions
|
||||
|
||||
/** A source language variable, to be converted into a set of SSA variables. */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
|
||||
predicate is_import_time(Stmt s) { not s.getScope+() instanceof Function }
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
|
||||
predicate import_star(ImportStar imp, ModuleValue exporter) {
|
||||
exporter.importedAs(imp.getImportedModuleName())
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
import Variables.MonkeyPatched
|
||||
import Loop
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
import python
|
||||
import Variables.MonkeyPatched
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
|
||||
/* Local variable part */
|
||||
predicate initialized_as_local(PlaceHolder use) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.types.ImportTime
|
||||
import interesting
|
||||
|
||||
from int line, ControlFlowNodeWithPointsTo f, Object o, ImportTimeScope n
|
||||
|
||||
Reference in New Issue
Block a user