aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat/verify.py
diff options
context:
space:
mode:
authorMartin Czygan <martin@archive.org>2021-11-16 19:06:26 +0000
committerMartin Czygan <martin@archive.org>2021-11-16 19:06:26 +0000
commit24dcddc4e4cff744e7c0a964856329d2ac69601d (patch)
treead8650892805e55ec4a6958f9e1539eb675332b8 /fuzzycat/verify.py
parent282f315c6ba3643c8c614220ab2f7e1d55de3658 (diff)
parent409392d66c3a6debe5bc69c0e2308209ac74ee35 (diff)
downloadfuzzycat-24dcddc4e4cff744e7c0a964856329d2ac69601d.tar.gz
fuzzycat-24dcddc4e4cff744e7c0a964856329d2ac69601d.zip
Merge branch 'martin-matcher-class' into 'master'
turn "match_release_fuzzy" into a class See merge request webgroup/fuzzycat!10
Diffstat (limited to 'fuzzycat/verify.py')
-rw-r--r--fuzzycat/verify.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py
index 9eb808b..f570511 100644
--- a/fuzzycat/verify.py
+++ b/fuzzycat/verify.py
@@ -233,10 +233,9 @@ def verify(a: Dict, b: Dict, min_title_length=5) -> Tuple[str, str]:
if has_doi_prefix(a_doi, "10.3403") and has_doi_prefix(b_doi, "10.3403"):
if a_doi + "u" == b_doi or b_doi + "u" == a_doi:
return Verify(Status.STRONG, Reason.CUSTOM_BSI_UNDATED)
- if a_title == b_title and ((dict_has_key(a, "extra.subtitle")
- and not dict_has_key(b, "extra.subtitle")) or
- (dict_has_key(b, "extra.subtitle")
- and not dict_has_key(a, "extra.subtitle"))):
+ if a_title == b_title and (
+ (dict_has_key(a, "extra.subtitle") and not dict_has_key(b, "extra.subtitle")) or
+ (dict_has_key(b, "extra.subtitle") and not dict_has_key(a, "extra.subtitle"))):
return Verify(Status.STRONG, Reason.CUSTOM_BSI_SUBDOC)
except PathAccessError:
pass