mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Add/update unit tests
This commit is contained in:
@@ -5,6 +5,8 @@ import semmle.python.ApiGraphs
|
||||
|
||||
/** Holds if `cls` has the `functools.total_ordering` decorator. */
|
||||
predicate totalOrdering(Class cls) {
|
||||
cls.getADecorator() =
|
||||
API::moduleImport("functools").getMember("total_ordering").asSource().asExpr()
|
||||
API::moduleImport("functools")
|
||||
.getMember("total_ordering")
|
||||
.asSource()
|
||||
.flowsTo(DataFlow::exprNode(cls.getADecorator()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user