Python: Appease the QLDoc checker

This commit is contained in:
Taus
2025-11-26 22:13:21 +00:00
parent c6ad438bfc
commit a7458df0a4
3 changed files with 3 additions and 0 deletions

View File

@@ -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
(

View File

@@ -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"

View File

@@ -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)