mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Appease the QLDoc checker
This commit is contained in:
@@ -299,6 +299,7 @@ class ClassWithPointsTo extends Class {
|
||||
override string getAQlClass() { none() }
|
||||
}
|
||||
|
||||
/** Gets the `Object` corresponding to the immutable literal `l`. */
|
||||
Object getLiteralObject(ImmutableLiteral l) {
|
||||
l instanceof IntegerLiteral and
|
||||
(
|
||||
|
||||
@@ -565,6 +565,7 @@ class StringLiteral extends Str_, ImmutableLiteral {
|
||||
override string toString() { result = "StringLiteral" }
|
||||
}
|
||||
|
||||
/** Holds if `n` is a named constant (`True`, `False`, or `None`) with name `id`. */
|
||||
predicate name_consts(Name_ n, string id) {
|
||||
exists(Variable v | py_variables(v, n) and id = v.getId() |
|
||||
id = "True" or id = "False" or id = "None"
|
||||
|
||||
@@ -368,6 +368,7 @@ predicate scope_raises_unknown(Scope s) {
|
||||
)
|
||||
}
|
||||
|
||||
/** An extension of `ExceptFlowNode` that provides points-to related methods. */
|
||||
class ExceptFlowNodeWithPointsTo extends ExceptFlowNode {
|
||||
private predicate handledObject_objectapi(Object obj, ClassObject cls, ControlFlowNode origin) {
|
||||
this.getType().(ControlFlowNodeWithPointsTo).refersTo(obj, cls, origin)
|
||||
|
||||
Reference in New Issue
Block a user