Skip to content

Commit 1076c03

Browse files
authored
Merge pull request github#1323 from markshannon/hotfix-path-fix
Python QL: Use Module.getPath() to implement ModuleObject.getPath()
2 parents ec10b76 + 0035dc2 commit 1076c03

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)