Skip to content

Commit d25b93d

Browse files
committed
Python: fix ql alerts
1 parent d10b181 commit d25b93d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/ql/lib/semmle/python/AstExtended.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class StringPart extends StringPart_, AstNode {
167167
* Gets the length of the content, that is the text between the prefix and the quote.
168168
* See `context` for obtaining the prefix and the quote.
169169
*/
170-
int getContentLenght() {
170+
int getContentLength() {
171171
exists(string prefix, string quote | this.context(prefix, quote) |
172172
result = this.getText().length() - prefix.length() - quote.length()
173173
)

python/ql/lib/semmle/python/regexp/RegexTreeView.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ module Impl implements RegexTreeViewSig {
230230
index > 0 and
231231
exists(int previousOffset | previousOffset = this.getPartOffset(index - 1) |
232232
result =
233-
previousOffset + re.(StrConst).getImplicitlyConcatenatedPart(index - 1).getContentLenght()
233+
previousOffset + re.(StrConst).getImplicitlyConcatenatedPart(index - 1).getContentlength()
234234
)
235235
}
236236

@@ -245,7 +245,7 @@ module Impl implements RegexTreeViewSig {
245245
// Example:
246246
// re.compile('...' r"""...this..""")
247247
// - `start` is the offset from `(` to `this` as counted after concatenating all parts.
248-
// - we subtract the lenght of the previous `StringPart`s, `'...'`, to know how far into this `StringPart` we go.
248+
// - we subtract the length of the previous `StringPart`s, `'...'`, to know how far into this `StringPart` we go.
249249
// - as the prefix 'r"""' is part of the `StringPart`, `this` is found that much further in.
250250
localOffset = start - this.getPartOffset(index) + prefixLength
251251
)

0 commit comments

Comments
 (0)