Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Feb 8, 2019
1 parent 40f483c commit b6d74b4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/actuariat_python/data/elections.py
Expand Up @@ -277,10 +277,6 @@ def html_to_text(html):
return parser.get_text()


_elections_vote_place_address_patterns = [
"bureau( de vote)?[- ]*n[^0-9]([0-9]{1,3})[- ]+(.*?)[- ]+([0-9]{5})[- ]+([-a-zéèàùâêîôûïöäëü']{2,40})[. ]"]


def elections_vote_place_address(folder=".", hide_warning=False, fLOG=noLOG):
"""
Scrapes and extracts addresses for every vote place (bureau de vote in French).
Expand All @@ -293,7 +289,9 @@ def elections_vote_place_address(folder=".", hide_warning=False, fLOG=noLOG):
The function does not retrieve everything due to the irregular format.
Sometimes, the city is missing or written above.
"""
global _elections_vote_place_address_patterns
_elections_vote_place_address_patterns = [
"bureau( de vote)?[- ]*n[^0-9]([0-9]{1,3})[- ]+(.*?)[- ]+([0-9]{5})[- ]+([-a-zéèàùâêîôûïöäëü']{2,40})[. ]"]

files = []
for deps in range(1, 96):
last = "bureaudevote%02d.htm" % deps
Expand Down

0 comments on commit b6d74b4

Please sign in to comment.