From 72618a480e5685e27a02a061d441722f566e1cdc Mon Sep 17 00:00:00 2001 From: DragoE9 <131825719+DragoE9@users.noreply.github.com> Date: Tue, 2 May 2023 12:08:22 -0600 Subject: [PATCH] Uses New numwanations shard instead for more efficency. --- UnitedWA.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/UnitedWA.py b/UnitedWA.py index fa19cca..6dbd278 100644 --- a/UnitedWA.py +++ b/UnitedWA.py @@ -54,16 +54,13 @@ total_endo = 0 total_member = 0 total_power = 0 - WA_Nations = set(((api.wa(1).get_shards("members"))["members"]).split(",")) for region in regions[0]: current_region = api.region(region) delegate = current_region.delegate nation = api.nation(delegate) del_endos = (nation.endorsements).split(",") num_endos = len(del_endos) - members = set(((current_region.get_shards("nations"))["nations"]).split(":")) - WA_members = WA_Nations.intersection(members) - WA_number = len(WA_members) + WA_number = int((current_region.get_shards("numwanations"))["numunnations"]) Power_Voting = [region,num_endos,WA_number,(num_endos+WA_number)] Voting_Power.append(Power_Voting) print("{:20}{:6}{:6}{:6}".format(region,num_endos,WA_number,Power_Voting[3]))