mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
Fixes #2665. Regenerated by tabbott with `lint --fix` after a rebase and change in parameters. Note from tabbott: In a few cases, this converts technical debt in the form of unsorted imports into different technical debt in the form of our largest files having very long, ugly import sequences at the start. I expect this change will increase pressure for us to split those files, which isn't a bad thing. Signed-off-by: Anders Kaseorg <anders@zulip.com>
14 lines
461 B
Python
14 lines
461 B
Python
from typing import Any
|
|
|
|
|
|
class BaseParser:
|
|
def __init__(self, html_source: str) -> None:
|
|
# We import BeautifulSoup here, because it's not used by most
|
|
# processes in production, and bs4 is big enough that
|
|
# importing it adds 10s of milliseconds to manage.py startup.
|
|
from bs4 import BeautifulSoup
|
|
self._soup = BeautifulSoup(html_source, "lxml")
|
|
|
|
def extract_data(self) -> Any:
|
|
raise NotImplementedError()
|