From 04f0be41258797c7eaaf73d4ec49650dbe93ee29 Mon Sep 17 00:00:00 2001 From: Itsupera Date: Sat, 10 Sep 2022 10:46:45 +0200 Subject: [PATCH] Upgrade mecab-python3 dependency for Python 3.10 support --- README.md | 2 +- furigana/__main__.py | 3 +-- setup.cfg | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3968461..ed1aa94 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ print_html('お茶にお煎餅、よく合いますね') ## Usage ``` -$ python3 furigana.py '活版印刷の流れを汲む出版作業では' +$ python3 furigana/furigana.py '活版印刷の流れを汲む出版作業では' ``` # Dependency diff --git a/furigana/__main__.py b/furigana/__main__.py index c17ce1f..7928c31 100644 --- a/furigana/__main__.py +++ b/furigana/__main__.py @@ -11,8 +11,7 @@ def return_html(text): for pair in split_furigana(text): if len(pair)==2: kanji,hira = pair - output += "{0}{1}". - format(kanji, hira) + output += f"{0}{1}".format(kanji, hira) else: output += pair[0] return output diff --git a/setup.cfg b/setup.cfg index 0c5413c..ad3d2eb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,5 +7,5 @@ setup_requires = pip >= 19.1 install_requires = - mecab-python3 == 1.0.3 + mecab-python3 >= 1.0.5 jaconv == 0.3 \ No newline at end of file