forked from github/pelican
File fixes for ruff B007, RUF015, PLR1722
This commit is contained in:
parent
cbe6c08f44
commit
9b77a9027b
5 changed files with 48 additions and 51 deletions
|
|
@ -483,7 +483,7 @@ class _HTMLWordTruncator(HTMLParser):
|
|||
def getoffset(self) -> int:
|
||||
line_start = 0
|
||||
lineno, line_offset = self.getpos()
|
||||
for i in range(lineno - 1):
|
||||
for _ in range(lineno - 1):
|
||||
line_start = self.rawdata.index("\n", line_start) + 1
|
||||
return line_start + line_offset
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue