From 82bb97d86d56fc2ac2c647a149760353d2f3e2c2 Mon Sep 17 00:00:00 2001 From: t-yamamura Date: Fri, 4 Feb 2022 18:19:02 +0900 Subject: [PATCH 1/4] download after setup --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 41c4074..a225771 100644 --- a/setup.py +++ b/setup.py @@ -12,12 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chikkarpy.config import download_dictionary - from setuptools import find_packages, setup +from chikkarpy.config import download_dictionary -download_dictionary() setup( name="chikkarpy", @@ -40,3 +38,6 @@ "sortedcontainers~=2.1.0" ] ) + +# Downloads the Sudachi Synonym dictionary +download_dictionary() From 7a1f8e4bb0bcf3b1cf7c210f04c5c3f4b21cfdd0 Mon Sep 17 00:00:00 2001 From: t-yamamura Date: Mon, 7 Feb 2022 14:44:01 +0900 Subject: [PATCH 2/4] use TYPE_CHECKING for type hints --- chikkarpy/chikkar.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chikkarpy/chikkar.py b/chikkarpy/chikkar.py index 64f996d..03b5af4 100644 --- a/chikkarpy/chikkar.py +++ b/chikkarpy/chikkar.py @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from .dictionarylib import Dictionary +from typing import TYPE_CHECKING + + +if TYPE_CHECKING: + from .dictionarylib import Dictionary class Chikkar(object): From 38d130b6c5e2657a6615e1978bcd3c452dc287b2 Mon Sep 17 00:00:00 2001 From: t-yamamura Date: Mon, 7 Feb 2022 14:47:20 +0900 Subject: [PATCH 3/4] update sortedcontainers --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3f0bc24..21519db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ dartsclone~=0.9.0 -sortedcontainers~=2.1.0 +sortedcontainers>=2.1.0 diff --git a/setup.py b/setup.py index a225771..714da27 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ }, install_requires=[ "dartsclone~=0.9.0", - "sortedcontainers~=2.1.0" + "sortedcontainers>=2.1.0" ] ) From 6367dcd8486ba0064feac9b736a1c53cb9f37c85 Mon Sep 17 00:00:00 2001 From: t-yamamura Date: Mon, 7 Feb 2022 14:55:45 +0900 Subject: [PATCH 4/4] fix import order for flake8 --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 714da27..458e7f0 100644 --- a/setup.py +++ b/setup.py @@ -12,10 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from setuptools import find_packages, setup - from chikkarpy.config import download_dictionary +from setuptools import find_packages, setup setup( name="chikkarpy",