diff options
author | Martin Czygan <martin@archive.org> | 2020-07-06 18:53:24 +0000 |
---|---|---|
committer | Martin Czygan <martin@archive.org> | 2020-07-06 18:53:24 +0000 |
commit | 68cf95bd1d1588c0d3170b4032596756e07ae718 (patch) | |
tree | 3163a803dd6743c84c83a786b5aea7eda3bbca8e /python/fatcat_tools/importers/common.py | |
parent | bea909f997bcef51e2624b9eea42c8fbe7115aaa (diff) | |
parent | 8583c6866f2bb89e8dfe5f5e5893048c2fd854e7 (diff) | |
download | fatcat-68cf95bd1d1588c0d3170b4032596756e07ae718.tar.gz fatcat-68cf95bd1d1588c0d3170b4032596756e07ae718.zip |
Merge branch 'bnewbold-lint' into 'master'
lint cleanups
See merge request webgroup/fatcat!62
Diffstat (limited to 'python/fatcat_tools/importers/common.py')
-rw-r--r-- | python/fatcat_tools/importers/common.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py index eafc6546..c0578224 100644 --- a/python/fatcat_tools/importers/common.py +++ b/python/fatcat_tools/importers/common.py @@ -161,18 +161,18 @@ def is_cjk(s): return False def test_is_cjk(): - assert is_cjk(None) == False - assert is_cjk('') == False - assert is_cjk('blah') == False - assert is_cjk('岡, 鹿, 梨, 阜, 埼') == True - assert is_cjk('[岡, 鹿, 梨, 阜, 埼]') == True - assert is_cjk('菊') == True - assert is_cjk('岡, 鹿, 梨, 阜, 埼 with eng after') == True - assert is_cjk('水道') == True - assert is_cjk('オウ, イク') == True # kanji - assert is_cjk('ひヒ') == True - assert is_cjk('き゚ゅ') == True - assert is_cjk('ㄴ, ㄹ, ㅁ, ㅂ, ㅅ') == True + assert is_cjk(None) is False + assert is_cjk('') is False + assert is_cjk('blah') is False + assert is_cjk('岡, 鹿, 梨, 阜, 埼') is True + assert is_cjk('[岡, 鹿, 梨, 阜, 埼]') is True + assert is_cjk('菊') is True + assert is_cjk('岡, 鹿, 梨, 阜, 埼 with eng after') is True + assert is_cjk('水道') is True + assert is_cjk('オウ, イク') is True # kanji + assert is_cjk('ひヒ') is True + assert is_cjk('き゚ゅ') is True + assert is_cjk('ㄴ, ㄹ, ㅁ, ㅂ, ㅅ') is True DOMAIN_REL_MAP = { "archive.org": "archive", @@ -368,7 +368,7 @@ class EntityImporter: if self._entity_queue: self.insert_batch(self._entity_queue) self.counts['insert'] += len(self._entity_queue) - self._entity_queue = [] + self._entity_queue = [] return self.counts |