Python: Fix uses of implicit this

Quoting the style guide:

"14. _Always_ qualify _calls_ to predicates of the same class with
`this`."
This commit is contained in:
Taus
2021-10-13 13:24:46 +00:00
committed by GitHub
parent a204b7f3e7
commit a9c8163ab3
9 changed files with 57 additions and 51 deletions

View File

@@ -86,13 +86,13 @@ class Module extends Module_, Scope, AstNode {
/** Gets the package containing this module (or parent package if this is a package) */
Module getPackage() {
this.getName().matches("%.%") and
result.getName() = getName().regexpReplaceAll("\\.[^.]*$", "")
result.getName() = this.getName().regexpReplaceAll("\\.[^.]*$", "")
}
/** Gets the name of the package containing this module */
string getPackageName() {
this.getName().matches("%.%") and
result = getName().regexpReplaceAll("\\.[^.]*$", "")
result = this.getName().regexpReplaceAll("\\.[^.]*$", "")
}
/** Gets the metrics for this module */