Python: Apply suggestions from code review

Co-authored-by: yoff <lerchedahl@gmail.com>
This commit is contained in:
Rasmus Wriedt Larsen
2022-06-17 15:04:57 +02:00
committed by GitHub
parent d6e68258a4
commit f1b0a814e0

View File

@@ -597,11 +597,9 @@ module API {
// "benign" and let subclasses edges flow through anyway.
// see example in https://github.com/django/django/blob/c2250cfb80e27cdf8d098428824da2800a18cadf/tests/auth_tests/test_views.py#L40-L46
(
not exists(clsExpr.getADecorator()) and
ref.asExpr() = clsExpr
or
ref.asExpr() = clsExpr.getADecoratorCall() and
not exists(PY::Call otherDecorator | otherDecorator.getArg(0) = ref.asExpr())
ref.asExpr() = clsExpr.getADecoratorCall()
)
)
or