mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
13 lines
363 B
Plaintext
13 lines
363 B
Plaintext
import python
|
|
import semmle.python.pointsto.MRO
|
|
import semmle.python.pointsto.PointsTo
|
|
import semmle.python.objects.ObjectInternal
|
|
|
|
ClassList mro(ClassObjectInternal cls) {
|
|
if Types::isNewStyle(cls) then result = Mro::newStyleMro(cls) else result = Mro::oldStyleMro(cls)
|
|
}
|
|
|
|
from ClassObjectInternal cls
|
|
where not cls.isBuiltin()
|
|
select cls.toString(), mro(cls)
|