From 37c86573f48c838f48c84459c3edb1a1e62fa027 Mon Sep 17 00:00:00 2001 From: Dmitry Luschan Date: Mon, 4 Dec 2023 06:19:12 +0600 Subject: [PATCH] Update consts.py check str attribute instead of an anki version --- src/syntax_highlighting/consts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syntax_highlighting/consts.py b/src/syntax_highlighting/consts.py index a315a7a..5649bd5 100644 --- a/src/syntax_highlighting/consts.py +++ b/src/syntax_highlighting/consts.py @@ -13,7 +13,7 @@ import os from anki import version -anki21 = version.startswith("2.1.") +anki21 = not hasattr(str, 'decode') sys_encoding = sys.getfilesystemencoding() if anki21: