Python: Fix formatting of isLegalExceptionType

This commit is contained in:
Rasmus Wriedt Larsen
2020-03-06 17:27:50 +01:00
parent 3ae1aada37
commit 14957345a3

View File

@@ -485,7 +485,8 @@ class ClassValue extends Value {
/** Whether this class is a legal exception class.
* What constitutes a legal exception class differs between major versions */
predicate isLegalExceptionType() {
not this.isNewStyle() or
not this.isNewStyle()
or
this.getASuperType() = ClassValue::baseException()
or
major_version() = 2 and this = ClassValue::tuple()