From 0c155fe92c82d68439843cbf39d7231cd452f737 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 26 Jun 2025 21:01:08 -0400 Subject: [PATCH] [dateparser] Update to `~=1.2.2` (#14346) --- stubs/dateparser/METADATA.toml | 2 +- stubs/dateparser/dateparser/search/search.pyi | 2 ++ stubs/dateparser/dateparser/timezone_parser.pyi | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stubs/dateparser/METADATA.toml b/stubs/dateparser/METADATA.toml index e48024514..289446be0 100644 --- a/stubs/dateparser/METADATA.toml +++ b/stubs/dateparser/METADATA.toml @@ -1,4 +1,4 @@ -version = "1.2.*" +version = "~=1.2.2" upstream_repository = "https://github.com/scrapinghub/dateparser" [tool.stubtest] diff --git a/stubs/dateparser/dateparser/search/search.pyi b/stubs/dateparser/dateparser/search/search.pyi index aeb8b863b..369c7355a 100644 --- a/stubs/dateparser/dateparser/search/search.pyi +++ b/stubs/dateparser/dateparser/search/search.pyi @@ -1,3 +1,4 @@ +from collections.abc import Collection from typing import Any from ..date import _DetectLanguagesFunction @@ -33,3 +34,4 @@ class DateSearchWithDetection: def search_dates( self, text, languages=None, settings=None, detect_languages_function: _DetectLanguagesFunction | None = None ): ... + def preprocess_text(self, text: str, languages: Collection[str]) -> str: ... diff --git a/stubs/dateparser/dateparser/timezone_parser.pyi b/stubs/dateparser/dateparser/timezone_parser.pyi index 0b0558d16..ff86e7810 100644 --- a/stubs/dateparser/dateparser/timezone_parser.pyi +++ b/stubs/dateparser/dateparser/timezone_parser.pyi @@ -1,6 +1,8 @@ +import pathlib import re from collections.abc import Generator from datetime import datetime, timedelta, tzinfo +from typing import Final class StaticTzInfo(tzinfo): def __init__(self, name: str, offset: timedelta) -> None: ... @@ -17,3 +19,6 @@ def build_tz_offsets(search_regex_parts: list[str]) -> Generator[tuple[str, dict def get_local_tz_offset() -> timedelta: ... local_tz_offset: timedelta + +CACHE_PATH: Final[pathlib.Path] +current_hash: int | None