From 64ece7f978eb18fbea02ccbb36734e6125b2b527 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 22 Jul 2016 07:18:01 -0400 Subject: [PATCH] Removed unused dbapi.rebuild_gender_stats() Thanks to Paul F. for finding this. --- gramps/plugins/db/dbapi/dbapi.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/gramps/plugins/db/dbapi/dbapi.py b/gramps/plugins/db/dbapi/dbapi.py index 0a338f58f..d2bdfbf7c 100644 --- a/gramps/plugins/db/dbapi/dbapi.py +++ b/gramps/plugins/db/dbapi/dbapi.py @@ -1850,32 +1850,6 @@ class DBAPI(DbGeneric): if row: return pickle.loads(row[0]) - def rebuild_gender_stats(self): - """ - Returns a dictionary of - {given_name: (male_count, female_count, unknown_count)} - Not called: this is a database-efficient version - """ - self.dbapi.execute("""SELECT given_name, gender_type FROM person;""") - gstats = {} - for row in self.dbapi.fetchall(): - first_name = row[0] - if first_name not in gstats: - gstats[first_name] = (0, 0, 0) - if gender_type == Person.MALE: - gstats[first_name] = (gstats[first_name][0] + 1, - gstats[first_name][1], - gstats[first_name][2]) - elif gender_type == Person.FEMALE: - gstats[first_name] = (gstats[first_name][0], - gstats[first_name][1] + 1, - gstats[first_name][2]) - else: - gstats[first_name] = (gstats[first_name][0], - gstats[first_name][1], - gstats[first_name][2] + 1) - return gstats - def get_gender_stats(self): """ Returns a dictionary of