Skip to content

Commit 17da281

Browse files
committed
Python: Small refactor to use extends .. instanceof
1 parent 7e7c363 commit 17da281

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ql/lib/semmle/python/frameworks/Starlette.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ module Starlette {
152152
}
153153

154154
/** An attribute read on a `starlette.requests.URL` instance that is a `urllib.parse.SplitResult` instance. */
155-
private class UrlSplitInstances extends Stdlib::SplitResult::InstanceSource {
155+
private class UrlSplitInstances extends Stdlib::SplitResult::InstanceSource instanceof DataFlow::AttrRead {
156156
UrlSplitInstances() {
157-
this.(DataFlow::AttrRead).getObject() = instance() and
158-
this.(DataFlow::AttrRead).getAttributeName() = "components"
157+
super.getObject() = instance() and
158+
super.getAttributeName() = "components"
159159
}
160160
}
161161
}

0 commit comments

Comments
 (0)