Replace Incomplete | None = None in third party stubs (#14063)

This commit is contained in:
Sebastian Rittau
2025-05-15 21:37:43 +02:00
committed by GitHub
parent acc51542c9
commit 126768408a
488 changed files with 2259 additions and 4044 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ class rrulebase:
def count(self): ...
def before(self, dt, inc: bool = False): ...
def after(self, dt, inc: bool = False): ...
def xafter(self, dt, count: Incomplete | None = None, inc: bool = False): ...
def xafter(self, dt, count=None, inc: bool = False): ...
def between(self, after, before, inc: bool = False, count: int = 1): ...
class rrule(rrulebase):
+1 -2
View File
@@ -1,5 +1,4 @@
import datetime
from _typeshed import Incomplete
from typing import ClassVar, Literal, Protocol, TypeVar
from ..relativedelta import relativedelta
@@ -99,7 +98,7 @@ class _ICalReader(Protocol):
class tzical:
def __init__(self, fileobj: str | _ICalReader) -> None: ...
def keys(self): ...
def get(self, tzid: Incomplete | None = None): ...
def get(self, tzid=None): ...
TZFILES: list[str]
TZPATHS: list[str]
@@ -10,7 +10,7 @@ class ZoneInfoFile:
zones: dict[Incomplete, Incomplete]
metadata: _MetadataType | None
def __init__(self, zonefile_stream: IO[bytes] | None = None) -> None: ...
def get(self, name, default: Incomplete | None = None): ...
def get(self, name, default=None): ...
def get_zonefile_instance(new_instance: bool = False) -> ZoneInfoFile: ...
def gettz(name): ...
@@ -1,11 +1,7 @@
from _typeshed import Incomplete, StrOrBytesPath
from _typeshed import StrOrBytesPath
from collections.abc import Sequence
from tarfile import TarInfo
def rebuild(
filename: StrOrBytesPath,
tag: Incomplete | None = None,
format: str = "gz",
zonegroups: Sequence[str | TarInfo] = [],
metadata: Incomplete | None = None,
filename: StrOrBytesPath, tag=None, format: str = "gz", zonegroups: Sequence[str | TarInfo] = [], metadata=None
) -> None: ...