Fix warning from pep8: E701 multiple statements on one line (colon).
--- 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("<div class='sense'>")
if sense.pos: