mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
fix lint issues
This commit is contained in:
parent
24dd116f91
commit
f6767d1cff
1 changed files with 4 additions and 2 deletions
|
@ -18,7 +18,6 @@ from anki import hooks
|
|||
from anki.cards import Card
|
||||
from anki.collection import _Collection
|
||||
from anki.consts import *
|
||||
from anki.decks import DeckManager
|
||||
from anki.lang import _, ngettext
|
||||
from anki.models import NoteType
|
||||
from anki.notes import Note
|
||||
|
@ -1305,10 +1304,13 @@ QTableView {{ gridline-color: {grid} }}
|
|||
def _deckFilters(self):
|
||||
def addDecks(parent, decks, parent_prefix):
|
||||
for node in decks:
|
||||
# pylint: disable=cell-var-from-loop
|
||||
fullname = parent_prefix + node.name
|
||||
if node.children:
|
||||
subm = parent.addMenu(node.name)
|
||||
subm.addItem(_("Filter"), lambda: self._filterFunc("deck", fullname))
|
||||
subm.addItem(
|
||||
_("Filter"), lambda: self._filterFunc("deck", fullname)
|
||||
)
|
||||
subm.addSeparator()
|
||||
addDecks(subm, node.children, fullname + "::")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue