[dateparser] Improve parse-related annotations (#14199)

Add a `# type: ignore`. Helps with #14194
This commit is contained in:
Sebastian Rittau
2025-06-01 01:00:54 +02:00
committed by GitHub
parent 3c8c233991
commit 5a3c495d2f
2 changed files with 4 additions and 2 deletions
@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from abc import abstractmethod
from typing import Any
from dateparser.conf import Settings
from dateparser.parser import _parser
class CalendarBase:
@@ -20,4 +22,4 @@ class non_gregorian_parser(_parser):
@abstractmethod
def handle_two_digit_year(self, year: int) -> int: ...
@classmethod
def parse(cls, datestring, settings): ...
def parse(cls, datestring: str, settings: Settings) -> tuple[Incomplete, Incomplete]: ... # type: ignore[override]
+1 -1
View File
@@ -54,7 +54,7 @@ class _parser:
ordered_num_directives: collections.OrderedDict[str, list[str]]
def __init__(self, tokens, settings: Settings): ...
@classmethod
def parse(cls, datestring: str, settings: Settings, tz: datetime.tzinfo | None = None): ...
def parse(cls, datestring: str, settings: Settings, tz: datetime.tzinfo | None = None) -> tuple[Incomplete, Incomplete]: ...
class tokenizer:
digits: Literal["0123456789:"]