Merge pull request #428 from Arthur-Milchior/unusedOptional

"unused" variable become optional.
This commit is contained in:
Damien Elmes 2020-01-24 17:28:47 +10:00 committed by GitHub
commit f260cfa07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ class AddCards(QDialog):
def setAndFocusNote(self, note: Note) -> None:
self.editor.setNote(note, focusTo=0)
def onModelChange(self, unused) -> None:
def onModelChange(self, unused=None) -> None:
oldNote = self.editor.note
note = self.mw.col.newNote()
self.previousNote = None

View File

@ -66,7 +66,7 @@ class DeckChooser(QHBoxLayout):
def cleanup(self) -> None:
gui_hooks.current_note_type_did_change.remove(self.onModelChangeNew)
def onModelChangeNew(self, unused):
def onModelChangeNew(self, unused=None):
self.onModelChange()
def onModelChange(self):