From 3849272541cfc8e42c43fa38b09d60d8c1012c5f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 16 Sep 2023 22:39:13 +0300 Subject: [PATCH] Style: Fix flake8 F821 undefined name 'unichr' --- compat.py | 2 ++ parse_html/bkmk_parse_html.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compat.py b/compat.py index ab6254c..b197445 100644 --- a/compat.py +++ b/compat.py @@ -6,6 +6,8 @@ if PY2: # disable flake8 checks on python 3 string_type = basestring # noqa unicode = unicode # noqa + unichr = unichr # noqa else: string_type = str unicode = str + unichr = chr diff --git a/parse_html/bkmk_parse_html.py b/parse_html/bkmk_parse_html.py index a3fc639..0043aa0 100644 --- a/parse_html/bkmk_parse_html.py +++ b/parse_html/bkmk_parse_html.py @@ -16,7 +16,7 @@ import os import re from htmlentitydefs import name2codepoint -from ..compat import unicode +from ..compat import unicode, unichr DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic parsers = [] -- 2.39.5