DemocracyClub / EveryElection

:ballot_box_with_check: For recording every election in the UK
https://elections.democracyclub.org.uk/
BSD 3-Clause "New" or "Revised" License
11 stars 14 forks source link

adds missing seat total pattern to lgbce review helper #2245

Closed awdem closed 2 weeks ago

awdem commented 2 weeks ago

This piece of ECO legislation uses the words 'electoral division' instead of 'ward' when stating the number of councillors in the text (see (4)):

Electoral divisions of Northumberland and number of councillors
 3.—(1) The existing electoral divisions of Northumberland are abolished.

   (2) Northumberland is divided into the 69 electoral divisions listed in Schedule 1.

   (3) Each electoral division comprises the area identified on the map by reference to the name of the electoral division.

   (4) The number of councillors to be elected for each electoral division is one.

This difference in wording caused get_seats_total_from_legislation to raise an error when I hit the write to S3 button because it only matches the equivalent text with the word 'ward'.

I've refactored get_seats_total_from_legislation to handle either 'ward' or 'electoral division' in the text.

coveralls commented 2 weeks ago

Coverage Status

coverage: 70.665%. remained the same when pulling e528288def677734ed05c205610de798ff650947 on awdem:bugfix/add-missing-seats-total-pattern-to-lgbce-review-helper into a404f4a5f466f199f0ea7548264c30be2d623f7f on DemocracyClub:master.