Skip to content

Commit

Permalink
relax, linter
Browse files Browse the repository at this point in the history
  • Loading branch information
zstumgoren committed May 1, 2024
1 parent f5bdd5d commit 084a0b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions clean/ca/orange_county_sheriff.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import time
from pathlib import Path
from typing import List

from bs4 import BeautifulSoup

from .. import utils
from ..cache import Cache


class Site:
name = "Orange County Sheriffs Department"

Expand Down Expand Up @@ -52,9 +55,9 @@ def _create_json(self) -> Path:
file_stem = self.disclosure_url.split("/")[-1]
html_location = f"{self.agency_slug}/{file_stem}.html"
html = self.cache.read(html_location)
soup = BeautifulSoup(html, "html.parser")
title = soup.find("title").text.strip()
links = soup.article.find_all("a")
soup = BeautifulSoup(html, "html.parser") # type: ignore
title = soup.find("title").text.strip() # type: ignore
links = soup.article.find_all("a") # type: ignore
urls = []
name = []
for link in links:
Expand Down Expand Up @@ -87,4 +90,4 @@ def _create_json(self) -> Path:
def _download_index_pages(self, url: str) -> Path:
file_stem = url.split("/")[-1]
base_file = f"{self.agency_slug}/{file_stem}.html"
return self.cache.download(base_file, url, "utf-8")
return self.cache.download(base_file, url, "utf-8")
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
test=pytest

[flake8]
extend-ignore = B006,D100,D103,D104,E203,E501
extend-ignore = B006,D100,D101,D102,D103,D104,D107,E203,E501

0 comments on commit 084a0b8

Please sign in to comment.