From d985abb8ec7ee24f234a9d73721f5b189d47dc92 Mon Sep 17 00:00:00 2001 From: Tilman Krummeck Date: Mon, 13 Sep 2021 11:23:03 +0200 Subject: [PATCH] Used script to generate pyi-files. --- alembic/op.pyi | 12 ++++++------ alembic/operations/ops.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) 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], -- 2.47.2