]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
fixup! Public interface, docs and a test
authorMikhail Bulash <scaryspiderpig@proton.me>
Thu, 24 Apr 2025 16:54:11 +0000 (18:54 +0200)
committerMikhail Bulash <scaryspiderpig@proton.me>
Thu, 24 Apr 2025 16:54:11 +0000 (18:54 +0200)
alembic/config.py
tests/test_config.py

index 1ff2e4623e8e4e3b609092ff0b40c7697da4a7fe..47fdb3f8da470417b6cfdbc5e31dd4d1c51e2b41 100644 (file)
@@ -346,8 +346,9 @@ class MessagingOptions(TypedDict, total=False):
 
 
 class CommandFunction(Protocol):
-    """A function that may be registered in the CLI as an alembic command. It must be a
-    named function and it must accept a :class:`.Config` object as the first argument.
+    """A function that may be registered in the CLI as an alembic command.
+    It must be a named function and it must accept a :class:`.Config` object
+    as the first argument.
     """
 
     __name__: str
@@ -563,8 +564,8 @@ class CommandLine:
 
     def register_command(self, fn: CommandFunction) -> None:
         """Registers a function as a CLI subcommand. The subcommand name
-        matches the function name, the arguments are extracted from the signature
-        and the help text is read from the docstring.
+        matches the function name, the arguments are extracted from the
+        signature and the help text is read from the docstring.
 
         .. seealso::
 
index 6a69463cd8f4358749dc3bdba0162fd132a48be8..0fad0dda571c8a45384072cd4a7910813b8c8d15 100644 (file)
@@ -263,7 +263,7 @@ class CommandLineTest(TestBase):
         cli = config.CommandLine()
 
         fake_stdout = []
-            
+
         def frobnicate(config: config.Config, revision: str) -> None:
             """Frobnicates the revision.
 
@@ -281,6 +281,4 @@ class CommandLineTest(TestBase):
 
         cli.main(["frobnicate", "abc42"])
 
-        assert fake_stdout == [
-            f"Revision abc42 frobnicated."
-        ]
+        assert fake_stdout == ["Revision abc42 frobnicated."]