From: Tilman Krummeck Date: Mon, 13 Sep 2021 09:23:03 +0000 (+0200) Subject: Used script to generate pyi-files. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d985abb8ec7ee24f234a9d73721f5b189d47dc92;p=thirdparty%2Fsqlalchemy%2Falembic.git Used script to generate pyi-files. --- diff --git a/alembic/op.pyi b/alembic/op.pyi index 01078dae..6bd17c75 100644 --- a/alembic/op.pyi +++ b/alembic/op.pyi @@ -541,9 +541,9 @@ def create_foreign_key( off normally. The :class:`~sqlalchemy.schema.AddConstraint` construct is ultimately used to generate the ALTER statement. - :param constraint_name: Name of the foreign key constraint. The name is - necessary so that an ALTER statement can be emitted. For setups that - use an automated naming scheme such as that described at + :param constraint_name: Name of the foreign key constraint. The name + is necessary so that an ALTER statement can be emitted. For setups + that use an automated naming scheme such as that described at :ref:`sqla:constraint_naming_conventions`, ``name`` here can be ``None``, as the event listener will apply the name to the constraint object when it is associated @@ -643,9 +643,9 @@ def create_primary_key( off normally. The :class:`~sqlalchemy.schema.AddConstraint` construct is ultimately used to generate the ALTER statement. - :param constraint_name: Name of the primary key constraint. The name is - necessary so that an ALTER statement can be emitted. For setups that - use an automated naming scheme such as that described at + :param constraint_name: Name of the primary key constraint. The name + is necessary so that an ALTER statement can be emitted. For setups + that use an automated naming scheme such as that described at :ref:`sqla:constraint_naming_conventions` ``name`` here can be ``None``, as the event listener will apply the name to the constraint object when it is associated diff --git a/alembic/operations/ops.py b/alembic/operations/ops.py index c4712117..70d7a8ea 100644 --- a/alembic/operations/ops.py +++ b/alembic/operations/ops.py @@ -588,7 +588,7 @@ class CreateForeignKeyOp(AddConstraintOp): def create_foreign_key( cls, operations: "Operations", - constraint_name: str, + constraint_name: Optional[str], source_table: str, referent_table: str, local_cols: List[str],