Update vobject (#12721)

This commit is contained in:
Jelle Zijlstra
2024-10-02 00:27:21 -07:00
committed by GitHub
parent 481230077b
commit 213ca9eb81
7 changed files with 21 additions and 11 deletions

View File

@@ -6,15 +6,11 @@ vobject.base.VBase.__init__
# See: https://github.com/eventable/vobject/pull/187
vobject.win32tz
# dependencies
vobject.icalendar.Pytz
# python2 compat
vobject.base.basestring
vobject.base.str_
vobject.base.to_unicode
vobject.base.to_basestring
vobject.vcard.basestring
vobject.base.unicode_type
# implementation details that users shouldn't depend on

View File

@@ -1,4 +1,8 @@
from typing import Final
from .base import Component
def iCalendar() -> Component: ...
def vCard() -> Component: ...
VERSION: Final[str]

View File

@@ -31,12 +31,21 @@ class VBase:
def transformFromNative(self): ...
def transformChildrenToNative(self) -> None: ...
def transformChildrenFromNative(self, clearBehavior: bool = True) -> None: ...
# Use Any because args and kwargs are passed to the behavior object
@overload
def serialize(
self, buf: None = None, lineLength: int = 75, validate: bool = True, behavior: Incomplete | None = None
self,
buf: None = None,
lineLength: int = 75,
validate: bool = True,
behavior: Incomplete | None = None,
*args: Any,
**kwargs: Any,
) -> str: ...
@overload
def serialize(self, buf: _W, lineLength: int = 75, validate: bool = True, behavior: Incomplete | None = None) -> _W: ...
def serialize(
self, buf: _W, lineLength: int = 75, validate: bool = True, behavior: Incomplete | None = None, *args: Any, **kwargs: Any
) -> _W: ...
def toVName(name, stripNum: int = 0, upper: bool = False): ...

View File

@@ -27,6 +27,6 @@ class Behavior:
@classmethod
def generateImplicitParameters(cls, obj) -> None: ...
@classmethod
def serialize(cls, obj, buf, lineLength, validate: bool = True): ...
def serialize(cls, obj, buf, lineLength, validate: bool = True, *args, **kwargs): ...
@classmethod
def valueRepr(cls, line): ...

View File

@@ -1,4 +1,8 @@
from collections.abc import Sequence
def change_tz(cal, new_timezone, default, utc_only: bool = False, utc_tz=...) -> None: ...
def show_timezones() -> None: ...
def convert_events(utc_only: bool, args: Sequence[str]) -> None: ...
def main() -> None: ...
version: str

View File

@@ -4,7 +4,4 @@ def deleteExtraneous(component, ignore_dtstamp: bool = False) -> None: ...
def diff(left, right): ...
def prettyDiff(leftObj, rightObj) -> None: ...
def main() -> None: ...
version: str
def getOptions(): ...

View File

@@ -77,7 +77,7 @@ class Photo(VCardTextBehavior):
@classmethod
def valueRepr(cls, line): ...
@classmethod
def serialize(cls, obj, buf, lineLength, validate) -> None: ... # type: ignore[override]
def serialize(cls, obj, buf, lineLength, validate, *args, **kwargs) -> None: ... # type: ignore[override]
def toListOrString(string): ...
def splitFields(string): ...