From bc8ed286ac2f8f4ef4505a1636fc26562e984996 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 27 Nov 2025 16:47:53 +0000 Subject: [PATCH] Python: Make some more points-to imports private This makes things a bit cleaner. After this, the only non-private (and non-`LegacyPointsTo`) imports of `semmle.python.{types,objects,pointsto}.*` are in `semmle.python.objects.ObjectInternal`, which is reasonable, as that is the entry point for the entire internal object API. --- python/ql/lib/semmle/python/pointsto/PointsTo.qll | 1 + python/ql/lib/semmle/python/types/Extensions.qll | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ql/lib/semmle/python/pointsto/PointsTo.qll b/python/ql/lib/semmle/python/pointsto/PointsTo.qll index ce1485c3f3d..66b82367de0 100644 --- a/python/ql/lib/semmle/python/pointsto/PointsTo.qll +++ b/python/ql/lib/semmle/python/pointsto/PointsTo.qll @@ -6,6 +6,7 @@ private import semmle.python.pointsto.PointsToContext private import semmle.python.pointsto.MRO private import semmle.python.types.Builtins private import semmle.python.types.Extensions +private import semmle.python.pointsto.Context private import semmle.python.internal.CachedStages private import semmle.python.types.Object private import semmle.python.types.FunctionObject diff --git a/python/ql/lib/semmle/python/types/Extensions.qll b/python/ql/lib/semmle/python/types/Extensions.qll index d292f568fb9..3cde11977d0 100644 --- a/python/ql/lib/semmle/python/types/Extensions.qll +++ b/python/ql/lib/semmle/python/types/Extensions.qll @@ -15,8 +15,8 @@ private import semmle.python.pointsto.PointsTo private import semmle.python.pointsto.PointsToContext private import semmle.python.objects.TObject /* Make ObjectInternal visible to save extra imports in user code */ -import semmle.python.objects.ObjectInternal -import semmle.python.pointsto.Context +private import semmle.python.objects.ObjectInternal +private import semmle.python.pointsto.Context abstract class PointsToExtension extends @py_flow_node { string toString() { result = "PointsToExtension with missing toString" }