mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Adds modernized files.
This commit is contained in:
@@ -69,7 +69,7 @@ predicate is_unhashable(ControlFlowNode f, ClassValue cls, ControlFlowNode origi
|
||||
predicate typeerror_is_caught(ControlFlowNode f) {
|
||||
exists (Try try |
|
||||
try.getBody().contains(f.getNode()) and
|
||||
try.getAHandler().getType().refersTo(theTypeErrorType()))
|
||||
try.getAHandler().getType().pointsTo(ClassValue::typeErrorType()))
|
||||
}
|
||||
|
||||
from ControlFlowNode f, ClassValue c, ControlFlowNode origin
|
||||
|
||||
@@ -743,6 +743,11 @@ module ClassValue {
|
||||
ClassValue nonetype() {
|
||||
result = TBuiltinClassObject(Builtin::special("NoneType"))
|
||||
}
|
||||
|
||||
/** Get the `ClassValue` for the `TypeError` class */
|
||||
ClassValue typeErrorType() {
|
||||
result = TBuiltinClassObject(Builtin::special("TypeError"))
|
||||
}
|
||||
|
||||
/** Get the `ClassValue` for the `NameError` class. */
|
||||
ClassValue nameError() {
|
||||
|
||||
Reference in New Issue
Block a user