enable some pylint convention tests in pylib
This commit is contained in:
parent
7e358707e5
commit
f26384a82f
|
@ -19,7 +19,17 @@ ignored-classes=
|
|||
output-format=colorized
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=C,R,
|
||||
disable=
|
||||
R,
|
||||
invalid-name,
|
||||
line-too-long,
|
||||
too-many-lines,
|
||||
missing-function-docstring,
|
||||
missing-module-docstring,
|
||||
missing-class-docstring,
|
||||
import-outside-toplevel,
|
||||
wrong-import-position,
|
||||
wrong-import-order,
|
||||
fixme,
|
||||
unused-wildcard-import,
|
||||
attribute-defined-outside-init,
|
||||
|
|
|
@ -452,8 +452,8 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""",
|
|||
self._writeDstMedia(lname, srcData)
|
||||
return match.group(0).replace(fname, lname)
|
||||
|
||||
for i in range(len(fields)):
|
||||
fields[i] = self.dst.media.transformNames(fields[i], repl)
|
||||
for idx, field in enumerate(fields):
|
||||
fields[idx] = self.dst.media.transformNames(field, repl)
|
||||
return joinFields(fields)
|
||||
|
||||
# Post-import cleanup
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# License: GNU GPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
# pytype: disable=attribute-error
|
||||
# type: ignore
|
||||
# pylint: disable=C
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
|
|
@ -683,7 +683,7 @@ did = ? and queue = {QUEUE_TYPE_REV} and due <= ? limit ?""",
|
|||
f"select 1 from cards where queue = {QUEUE_TYPE_SIBLING_BURIED} and did in %s limit 1"
|
||||
% sdids
|
||||
)
|
||||
return not not cnt
|
||||
return bool(cnt)
|
||||
|
||||
# Next time reports
|
||||
##########################################################################
|
||||
|
|
|
@ -701,11 +701,11 @@ limit ?"""
|
|||
now = intTime()
|
||||
delays = delays[-left:]
|
||||
ok = 0
|
||||
for i in range(len(delays)):
|
||||
now += int(delays[i] * 60)
|
||||
for idx, delay in enumerate(delays):
|
||||
now += int(delay * 60)
|
||||
if now > self.dayCutoff:
|
||||
break
|
||||
ok = i
|
||||
ok = idx
|
||||
return ok + 1
|
||||
|
||||
def _graduatingIvl(
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: disable=C
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
|
|
Loading…
Reference in New Issue