aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJ08nY2022-09-19 14:57:28 +0200
committerJ08nY2022-09-19 14:57:28 +0200
commit9407cffb837275d6f86b157996da4ba7f89b856d (patch)
tree5532a345e5053604ca234f1e8e6a51fd964cb370
parentb0183cd161cf22052237cdc50ddeb07ba9046997 (diff)
downloadsec-certs-9407cffb837275d6f86b157996da4ba7f89b856d.tar.gz
sec-certs-9407cffb837275d6f86b157996da4ba7f89b856d.tar.zst
sec-certs-9407cffb837275d6f86b157996da4ba7f89b856d.zip
Make mypy happy.
-rw-r--r--sec_certs/sample/common_criteria.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sec_certs/sample/common_criteria.py b/sec_certs/sample/common_criteria.py
index 387dca4c..9c87662d 100644
--- a/sec_certs/sample/common_criteria.py
+++ b/sec_certs/sample/common_criteria.py
@@ -308,7 +308,7 @@ class CommonCriteriaCert(
matches[cert_id] += 1
if not matches:
return {}
- total = matches.total()
+ total = sum(matches.values())
results = {}
for candidate, count in matches.items():
results[candidate] = count / total
@@ -327,10 +327,10 @@ class CommonCriteriaCert(
if scheme not in cert_id_matches:
return {}
- matches = Counter(cert_id_matches[scheme])
+ matches: Counter = Counter(cert_id_matches[scheme])
if not matches:
return {}
- total = matches.total()
+ total = sum(matches.values())
results = {}
for candidate, count in matches.items():
results[candidate] = count / total
@@ -355,7 +355,7 @@ class CommonCriteriaCert(
matches[cert_id] += 1
if not matches:
return {}
- total = matches.total()
+ total = sum(matches.values())
results = {}
for candidate, count in matches.items():
results[candidate] = count / total