From: Federico Caselli Date: Wed, 19 Nov 2025 22:18:26 +0000 (+0100) Subject: ensure stub tests run on nox X-Git-Tag: rel_1_18_0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13c9b711144a8026d0f0d0406590a0c0ef659740;p=thirdparty%2Fsqlalchemy%2Falembic.git ensure stub tests run on nox Change-Id: I18fb652a475ed59ce92173da1bfa05be5de4b953 --- diff --git a/alembic/op.pyi b/alembic/op.pyi index 8cdf7590..cb4953c1 100644 --- a/alembic/op.pyi +++ b/alembic/op.pyi @@ -1214,14 +1214,27 @@ def get_context() -> MigrationContext: """ -def implementation_for(op_cls: Any) -> Callable[[_C], _C]: +def implementation_for( + op_cls: Any, replace: bool = False +) -> Callable[[_C], _C]: """Register an implementation for a given :class:`.MigrateOperation`. + :param replace: when True, allows replacement of an already + registered implementation for the given operation class. This + enables customization of built-in operations such as + :class:`.CreateTableOp` by providing an alternate implementation + that can augment, modify, or conditionally invoke the default + behavior. + + .. versionadded:: 1.17.2 + This is part of the operation extensibility API. .. seealso:: - :ref:`operation_plugins` - example of use + :ref:`operation_plugins` + + :ref:`operations_extending_builtin` """ diff --git a/pyproject.toml b/pyproject.toml index 9e8f81b9..bc43bdda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,8 @@ alembic = "alembic.config:main" tests = [ "pytest>8,<10", "pytest-xdist", - "black==25.1.0", # for test_post_write.py + "black==25.9.0", # for test_post_write.py + "zimports", # for stub testing "tzdata", "junitparser" ]