# HG changeset patch # User Oleksandr Gavenko # Date 1480063949 -7200 # Node ID 38ff2e2ffd5c97c5b7e009b6c7257bb3e5a205e4 # Parent 5fc9bc68fb9c7c8872c0eb047c9fa38335209776 Fix warning from pep8: E701 multiple statements on one line (colon). diff -r 5fc9bc68fb9c -r 38ff2e2ffd5c py/gadict_srs_anki.py --- a/py/gadict_srs_anki.py Fri Nov 25 10:48:21 2016 +0200 +++ b/py/gadict_srs_anki.py Fri Nov 25 10:52:29 2016 +0200 @@ -99,6 +99,7 @@ finally: FIN.close() + def cleanup(collection, tmpdir): if collection: collection.close() @@ -192,11 +193,16 @@ } """ + def note_add_tags(note, tags): - if isinstance(tags, str): note.tags = [tags] - elif isinstance(tags, list): note.tags = tags - elif tags is None: pass - else: raise Exception('Expecting string or list of tags...') + if isinstance(tags, str): + note.tags = [tags] + elif isinstance(tags, list): + note.tags = tags + elif tags is None: + pass + else: + raise Exception('Expecting string or list of tags...') class AnkiDbBuilder: @@ -322,7 +328,6 @@ collection.models.save(model) self.model_pl = model - def guid(self, nodetype, headword): """ :nodetype used to generate different notes from same headword @@ -372,6 +377,7 @@ def close(self): self.collection.close() + def write_sense(buf, sense, with_examples=True): buf.append("
") if sense.pos: