summaryrefslogtreecommitdiff
path: root/alembic/operations/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-11-25 12:29:40 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-11-26 09:18:00 -0500
commit3b09a89d95f765399324dd53b4cb8504b0a7903b (patch)
treedc0837c10c7f0374c14ae4f267598f0060dfaddd /alembic/operations/base.py
parentfc451e60731ad5b8d73255f0a1996e1d4e0f20de (diff)
downloadalembic-3b09a89d95f765399324dd53b4cb8504b0a7903b.tar.gz
run pyupgrade
command is: find alembic -name "*.py" | xargs pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format I'm having some weird fighting with the tools/write_pyi, where in different runtime contexts it keeps losing "MigrationContext" and also Callable drops the args, but it's not consisistent. For whatever reason, under py311 things *do* work every time. im working w/ clean tox environments so not really sure what the change is. anyway, let's at least fix the quoting up around the types. This is towards getting the "*" in the op signatures for #1130. Change-Id: I9175905d3b4325e03a97d6752356b70be20e9fad
Diffstat (limited to 'alembic/operations/base.py')
-rw-r--r--alembic/operations/base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/alembic/operations/base.py b/alembic/operations/base.py
index 2178998..04b66b5 100644
--- a/alembic/operations/base.py
+++ b/alembic/operations/base.py
@@ -75,7 +75,7 @@ class Operations(util.ModuleClsProxy):
"""
- impl: Union["DefaultImpl", "BatchOperationsImpl"]
+ impl: Union[DefaultImpl, BatchOperationsImpl]
_to_impl = util.Dispatcher()
def __init__(
@@ -222,13 +222,13 @@ class Operations(util.ModuleClsProxy):
schema: Optional[str] = None,
recreate: Literal["auto", "always", "never"] = "auto",
partial_reordering: Optional[tuple] = None,
- copy_from: Optional["Table"] = None,
+ copy_from: Optional[Table] = None,
table_args: Tuple[Any, ...] = (),
table_kwargs: Mapping[str, Any] = util.immutabledict(),
reflect_args: Tuple[Any, ...] = (),
reflect_kwargs: Mapping[str, Any] = util.immutabledict(),
naming_convention: Optional[Dict[str, str]] = None,
- ) -> Iterator["BatchOperations"]:
+ ) -> Iterator[BatchOperations]:
"""Invoke a series of per-table migrations in batch.
Batch mode allows a series of operations specific to a table
@@ -514,7 +514,7 @@ class BatchOperations(Operations):
"""
- impl: "BatchOperationsImpl"
+ impl: BatchOperationsImpl
def _noop(self, operation):
raise NotImplementedError(