diff --git a/stubs/peewee/METADATA.toml b/stubs/peewee/METADATA.toml index c7f85d6f78af..16c45e60207e 100644 --- a/stubs/peewee/METADATA.toml +++ b/stubs/peewee/METADATA.toml @@ -1,4 +1,4 @@ -version = "3.17.8" +version = "3.17.9" upstream_repository = "https://github.com/coleifer/peewee" # We're not providing stubs for all playhouse modules right now # https://github.com/python/typeshed/pull/11731#issuecomment-2065729058 diff --git a/stubs/peewee/peewee.pyi b/stubs/peewee/peewee.pyi index f9066c393709..b562ba5a00c1 100644 --- a/stubs/peewee/peewee.pyi +++ b/stubs/peewee/peewee.pyi @@ -1371,7 +1371,7 @@ class ForeignKeyField(Field): deferred: Incomplete object_id_name: Incomplete lazy_load: Incomplete - constraint_name: Incomplete + constraint_name: str | None def __init__( self, model, @@ -1385,7 +1385,7 @@ class ForeignKeyField(Field): to_field: Incomplete | None = ..., object_id_name: Incomplete | None = ..., lazy_load: bool = ..., - constraint_name: Incomplete | None = ..., + constraint_name: str | None = ..., related_name: Incomplete | None = ..., *args, **kwargs, @@ -1399,7 +1399,8 @@ class ForeignKeyField(Field): column_name: Incomplete safe_name: Incomplete def bind(self, model, name, set_attribute: bool = ...) -> None: ... - def foreign_key_constraint(self): ... + def foreign_key_constraint(self, explicit_name: bool = False) -> NodeList: ... + def get_constraint_name(self) -> str: ... def __getattr__(self, attr: str): ... class DeferredForeignKey(Field):