Skip to content

Commit 56c83e2

Browse files
tausbnCopilot
andauthored
Python: Make comment more precise
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5859590 commit 56c83e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,8 @@ module DuckTyping {
20892089
/**
20902090
* Holds if `cls` is a new-style class. In Python 3, all classes are new-style.
20912091
* In Python 2, a class is new-style if it (transitively) inherits from `object`,
2092-
* or has a declared `__metaclass__`, or has an unresolved base class.
2092+
* or has a declared `__metaclass__`, or is in a module with a module-level
2093+
* `__metaclass__` declaration, or has an unresolved base class.
20932094
*/
20942095
predicate isNewStyle(Class cls) {
20952096
major_version() = 3

0 commit comments

Comments
 (0)