mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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.cards import Card
|
||||||
from anki.collection import _Collection
|
from anki.collection import _Collection
|
||||||
from anki.consts import *
|
from anki.consts import *
|
||||||
from anki.decks import DeckManager
|
|
||||||
from anki.lang import _, ngettext
|
from anki.lang import _, ngettext
|
||||||
from anki.models import NoteType
|
from anki.models import NoteType
|
||||||
from anki.notes import Note
|
from anki.notes import Note
|
||||||
|
@ -1305,10 +1304,13 @@ QTableView {{ gridline-color: {grid} }}
|
||||||
def _deckFilters(self):
|
def _deckFilters(self):
|
||||||
def addDecks(parent, decks, parent_prefix):
|
def addDecks(parent, decks, parent_prefix):
|
||||||
for node in decks:
|
for node in decks:
|
||||||
|
# pylint: disable=cell-var-from-loop
|
||||||
fullname = parent_prefix + node.name
|
fullname = parent_prefix + node.name
|
||||||
if node.children:
|
if node.children:
|
||||||
subm = parent.addMenu(node.name)
|
subm = parent.addMenu(node.name)
|
||||||
subm.addItem(_("Filter"), lambda: self._filterFunc("deck", fullname))
|
subm.addItem(
|
||||||
|
_("Filter"), lambda: self._filterFunc("deck", fullname)
|
||||||
|
)
|
||||||
subm.addSeparator()
|
subm.addSeparator()
|
||||||
addDecks(subm, node.children, fullname + "::")
|
addDecks(subm, node.children, fullname + "::")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue