From 2014458e82a0ab9e46a3094852f22dd24c91eb5a Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 8 May 2016 12:05:32 -0700 Subject: [PATCH] Fixups, adding yomichan-common submodule --- .gitmodules | 3 +++ common | 1 + yomi_base/reader_util.py | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 common diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9df4733 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "common"] + path = common + url = https://github.com/FooSoft/yomichan-common diff --git a/common b/common new file mode 160000 index 0000000..9976c57 --- /dev/null +++ b/common @@ -0,0 +1 @@ +Subproject commit 9976c57247e5d65040242ddf74c871ec95629ad7 diff --git a/yomi_base/reader_util.py b/yomi_base/reader_util.py index f5a6700..0be70c1 100644 --- a/yomi_base/reader_util.py +++ b/yomi_base/reader_util.py @@ -45,7 +45,7 @@ def findSentence(content, position): quotesBwd = {u'」': u'「', u'』': u'『', u"'": u"'", u'"': u'"'} terminators = u'。..??!!' - quoteStack = list() + quoteStack = [] start = 0 for i in xrange(position, start, -1): @@ -60,7 +60,7 @@ def findSentence(content, position): elif c in quotesBwd: quoteStack.insert(0, quotesBwd[c]) - quoteStack = list() + quoteStack = [] end = len(content) for i in xrange(position, end): @@ -83,7 +83,7 @@ def findSentence(content, position): def formatFields(fields, markup): - result = dict() + result = {} for field, value in fields.items(): try: result[field] = value.format(**markup)