Add missing defaults to third-party stubs (#14617)

This commit is contained in:
Jelle Zijlstra
2025-08-21 13:36:29 -07:00
committed by GitHub
parent 82926783a4
commit 573b57d8da
54 changed files with 383 additions and 376 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ def unescape_list_or_string(val: str) -> str: ...
class Contentline(str):
strict: bool
def __new__(cls, value: str | bytes, strict: bool = False, encoding: str = ...) -> Self: ...
def __new__(cls, value: str | bytes, strict: bool = False, encoding: str = "utf-8") -> Self: ...
@classmethod
def from_parts(cls, name: ICAL_TYPE, params: Parameters, values, sorted: bool = True) -> Self: ...
def parts(self) -> tuple[str, Parameters, str]: ...
+4 -4
View File
@@ -12,10 +12,10 @@ ICAL_TYPE: TypeAlias = str | bytes
def from_unicode(value: ICAL_TYPE, encoding: str = "utf-8") -> bytes: ...
def to_unicode(value: ICAL_TYPE, encoding: str = "utf-8-sig") -> str: ...
@overload
def data_encode(data: ICAL_TYPE, encoding: str = ...) -> bytes: ...
def data_encode(data: ICAL_TYPE, encoding: str = "utf-8") -> bytes: ...
@overload
def data_encode(data: dict[Any, Any], encoding: str = ...) -> dict[Any, Any]: ...
def data_encode(data: dict[Any, Any], encoding: str = "utf-8") -> dict[Any, Any]: ...
@overload
def data_encode(data: list[Any] | tuple[Any, ...], encoding: str = ...) -> list[Any]: ...
def data_encode(data: list[Any] | tuple[Any, ...], encoding: str = "utf-8") -> list[Any]: ...
@overload
def data_encode(data: _T, encoding: str = ...) -> _T: ...
def data_encode(data: _T, encoding: str = "utf-8") -> _T: ...