From 56c83e250e29f20be505d577080b0966e0f9bfa4 Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 23 Mar 2026 15:09:27 +0100 Subject: [PATCH] Python: Make comment more precise Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../semmle/python/dataflow/new/internal/DataFlowDispatch.qll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll index 21fa6872864..abdf03daa13 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll @@ -2089,7 +2089,8 @@ module DuckTyping { /** * Holds if `cls` is a new-style class. In Python 3, all classes are new-style. * In Python 2, a class is new-style if it (transitively) inherits from `object`, - * or has a declared `__metaclass__`, or has an unresolved base class. + * or has a declared `__metaclass__`, or is in a module with a module-level + * `__metaclass__` declaration, or has an unresolved base class. */ predicate isNewStyle(Class cls) { major_version() = 3