Skip to content

Commit 0035dc2

Browse files
committed
Python QL: Use Module.getPath() to implement ModuleObject.getPath()
1 parent 4e10e28 commit 0035dc2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/ql/src/semmle/python/types/ModuleObject.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,7 @@ class PackageObject extends ModuleObject {
234234
}
235235

236236
override Container getPath() {
237-
exists(ModuleObject m |
238-
m.getPackage() = this |
239-
result = m.getPath().getParent()
240-
)
237+
result = this.getModule().getPath()
241238
}
242239

243240
ModuleObject submodule(string name) {

0 commit comments

Comments
 (0)