Bump peewee to 3.17.3 and fix stubtest entries (#11787)

This commit is contained in:
Avasam
2024-04-19 02:52:39 -04:00
committed by GitHub
parent d26f125160
commit 48a845e070
3 changed files with 58 additions and 42 deletions

View File

@@ -1,25 +1,10 @@
peewee.DQ.__invert__
peewee.DateField.day
peewee.DateField.month
peewee.DateField.year
peewee.DateTimeField.day
peewee.DateTimeField.hour
peewee.DateTimeField.minute
peewee.DateTimeField.month
peewee.DateTimeField.second
peewee.DateTimeField.year
# Stubtest doesn't recognize __ as indicating positional-only arg at runtime
# https://github.com/python/mypy/issues/15302
peewee.Model.insert
peewee.Model.replace
peewee.Model.update
peewee.TimeField.hour
peewee.TimeField.minute
peewee.TimeField.second
peewee.TimestampField.day
peewee.TimestampField.hour
peewee.TimestampField.minute
peewee.TimestampField.month
peewee.TimestampField.second
peewee.TimestampField.year
# Wrapped with @Node.copy which changes the signature to "def (self, *args, **kwargs)"
peewee.DQ.__invert__
peewee.Window.as_groups
peewee.Window.as_range
peewee.Window.as_rows

View File

@@ -1,2 +1,2 @@
version = "3.17.0"
version = "3.17.3"
upstream_repository = "https://github.com/coleifer/peewee"

View File

@@ -2,9 +2,9 @@ import itertools
import logging
import threading
from _typeshed import Incomplete, SupportsKeysAndGetItem
from collections.abc import Callable, Generator, Iterable
from collections.abc import Callable, Generator, Iterable, Iterator
from types import TracebackType
from typing import Any, ClassVar, NamedTuple, TypeVar
from typing import Any, ClassVar, Literal, NamedTuple, TypeVar
from typing_extensions import Self
class NullHandler(logging.Handler):
@@ -128,19 +128,23 @@ class _DynamicColumn:
class _ExplicitColumn:
def __get__(self, instance, instance_type: Incomplete | None = ...): ...
class Star(Node):
def __init__(self, source) -> None: ...
def __sql__(self, ctx): ...
class Source(Node):
c: Incomplete
def __init__(self, alias: Incomplete | None = ...) -> None: ...
def alias(self, name) -> None: ...
def select(self, *columns): ...
@property
def __star__(self) -> Star: ...
def join(self, dest, join_type=..., on: Incomplete | None = ...): ...
def left_outer_join(self, dest, on: Incomplete | None = ...): ...
def cte(self, name, recursive: bool = ..., columns: Incomplete | None = ..., materialized: Incomplete | None = ...): ...
def get_sort_key(self, ctx): ...
def apply_alias(self, ctx): ...
def apply_column(self, ctx): ...
@property
def star(self) -> NodeList: ...
class _HashableSource:
def __init__(self, *args, **kwargs) -> None: ...
@@ -1230,10 +1234,19 @@ class BigBitFieldData:
instance: Incomplete
name: Incomplete
def __init__(self, instance, name) -> None: ...
def clear(self) -> None: ...
def set_bit(self, idx) -> None: ...
def clear_bit(self, idx) -> None: ...
def toggle_bit(self, idx): ...
def is_set(self, idx): ...
__getitem__ = is_set
def __setitem__(self, item: int, value: bool) -> None: ...
__delitem__ = clear_bit
def __len__(self) -> int: ...
def __and__(self, other: BigBitFieldData | bytes | bytearray | memoryview) -> bytearray: ...
def __or__(self, other: BigBitFieldData | bytes | bytearray | memoryview) -> bytearray: ...
def __xor__(self, other: BigBitFieldData | bytes | bytearray | memoryview) -> bytearray: ...
def __iter__(self) -> Iterator[Literal[0, 1]]: ...
def __bytes__(self) -> bytes: ...
class BigBitFieldAccessor(FieldAccessor):
@@ -1265,12 +1278,18 @@ class DateTimeField(_BaseFormattedField):
def adapt(self, value): ...
def to_timestamp(self): ...
def truncate(self, part): ...
year: Incomplete
month: Incomplete
day: Incomplete
hour: Incomplete
minute: Incomplete
second: Incomplete
@property
def year(self): ...
@property
def month(self): ...
@property
def day(self): ...
@property
def hour(self): ...
@property
def minute(self): ...
@property
def second(self): ...
class DateField(_BaseFormattedField):
field_type: str
@@ -1278,17 +1297,23 @@ class DateField(_BaseFormattedField):
def adapt(self, value): ...
def to_timestamp(self): ...
def truncate(self, part): ...
year: Incomplete
month: Incomplete
day: Incomplete
@property
def year(self): ...
@property
def month(self): ...
@property
def day(self): ...
class TimeField(_BaseFormattedField):
field_type: str
formats: Incomplete
def adapt(self, value): ...
hour: Incomplete
minute: Incomplete
second: Incomplete
@property
def hour(self): ...
@property
def minute(self): ...
@property
def second(self): ...
class TimestampField(BigIntegerField):
valid_resolutions: Incomplete
@@ -1302,12 +1327,18 @@ class TimestampField(BigIntegerField):
def db_value(self, value): ...
def python_value(self, value): ...
def from_timestamp(self): ...
year: Incomplete
month: Incomplete
day: Incomplete
hour: Incomplete
minute: Incomplete
second: Incomplete
@property
def year(self): ...
@property
def month(self): ...
@property
def day(self): ...
@property
def hour(self): ...
@property
def minute(self): ...
@property
def second(self): ...
class IPField(BigIntegerField):
def db_value(self, val): ...