]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
ensure stub tests run on nox
authorFederico Caselli <cfederico87@gmail.com>
Wed, 19 Nov 2025 22:18:26 +0000 (23:18 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 19 Nov 2025 22:21:09 +0000 (23:21 +0100)
Change-Id: I18fb652a475ed59ce92173da1bfa05be5de4b953

alembic/op.pyi
pyproject.toml

index 8cdf7590756286685cedd2a82678c39b7ca55dc6..cb4953c1599d27122c9df156f9473fcfad514f9d 100644 (file)
@@ -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`
 
     """
 
index 9e8f81b9a5c67b336e2979c6af96e14f604a6965..bc43bdda9b3c84673247c2c80e8e676402a120cc 100644 (file)
@@ -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"
 ]