From 539a9de0579e998b1deb1b53b32d21cc4fd2d903 Mon Sep 17 00:00:00 2001 From: Samuel Pei Date: Wed, 6 Nov 2024 10:59:11 -0500 Subject: [PATCH] Updated to follow ruff-formatting --- .pre-commit-config.yaml | 2 +- ca_qc_montreal_est/people.py | 6 +++++- requirements.txt | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2aea3241..5f6d4c99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: quarterly skip: [pip-compile] default_language_version: - python: python3.10 + python: python3.11 repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.9 diff --git a/ca_qc_montreal_est/people.py b/ca_qc_montreal_est/people.py index 9457cb05..ca966495 100644 --- a/ca_qc_montreal_est/people.py +++ b/ca_qc_montreal_est/people.py @@ -2,10 +2,14 @@ from utils import CanadianScraper COUNCIL_PAGE = "http://ville.montreal-est.qc.ca/vie-democratique/conseil-municipal/" + + class MontrealEstPersonScraper(CanadianScraper): def scrape(self): page = self.lxmlize(COUNCIL_PAGE) - councillors = page.xpath('//div[contains (@class, "membreimg text-center membres-conseil")]//div//div[@class="col-lg-6"]') + councillors = page.xpath( + '//div[contains (@class, "membreimg text-center membres-conseil")]//div//div[@class="col-lg-6"]' + ) assert len(councillors), "No councillors found" for councillor in councillors: name = councillor.xpath('.//div[@class="bg-trans-gris"]/span/text()')[0] diff --git a/requirements.txt b/requirements.txt index 080af981..9ec2ad3f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -69,8 +69,6 @@ sqlparse==0.5.1 # via django text-unidecode==1.3 # via python-slugify -typing-extensions==4.12.2 - # via asgiref unidecode==0.4.14 # via -r requirements.in urllib3==1.26.20