Commit 6f3c00d3 authored by Jan Reimes's avatar Jan Reimes
Browse files

refactor(crawlers): remove unused imports and TYPE_CHECKING blocks

* Cleaned up import statements in meeting_doclist.py and parallel.py
* Removed TYPE_CHECKING conditions in http_client.py
* Improved code readability by eliminating unnecessary lines
parent bcd19cd3
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -8,16 +8,7 @@ import re
from datetime import UTC, datetime
from decimal import Decimal
from pathlib import Path
from typing import TYPE_CHECKING

import pandas as pd

from tdoc_crawler.http_client import create_cached_session

if TYPE_CHECKING:
from tdoc_crawler.models.tdocs import TDocMetadata
else:
    from tdoc_crawler.models.tdocs import TDocMetadata  # noqa: PLC0415

logger = logging.getLogger(__name__)

+0 −10
Original line number Diff line number Diff line
@@ -8,17 +8,7 @@ import re
from collections.abc import Iterable
from datetime import UTC, datetime
from pathlib import Path
from typing import TYPE_CHECKING
from urllib.parse import urljoin

import requests
from bs4 import BeautifulSoup

from tdoc_crawler.crawlers.constants import EXCLUDED_DIRS, EXCLUDED_DIRS_NORMALIZED, TDOC_PATTERN_STR, TDOC_SUBDIRS, TDOC_SUBDIRS_NORMALIZED
from tdoc_crawler.http_client import create_cached_session

if TYPE_CHECKING:  # pragma: no cover - helpful for type checkers only
    pass

logger = logging.getLogger(__name__)

+0 −8
Original line number Diff line number Diff line
@@ -4,15 +4,7 @@ from __future__ import annotations

import logging
from pathlib import Path
from typing import TYPE_CHECKING

import requests
from hishel import SyncSqliteStorage
from hishel.requests import CacheAdapter
from urllib3.util.retry import Retry

if TYPE_CHECKING:
    pass

logger = logging.getLogger(__name__)