From b0f8594f9d76d19657b43fed8fb7f431805c5123 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lu=C3=ADs=20Henrique=20Allebrandt=20Schunemann?= <44511825+luishenri@users.noreply.github.com> Date: Sat, 16 Aug 2025 13:02:53 -0300 Subject: [PATCH] style(config): manually run pre-commit --- alembic/config.py | 8 ++++++-- tests/test_config.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/alembic/config.py b/alembic/config.py index a70359af..b8c60a48 100644 --- a/alembic/config.py +++ b/alembic/config.py @@ -426,7 +426,9 @@ class Config: def get_alembic_option( self, name: str, default: Optional[str] = None - ) -> Union[None, str, list[str], dict[str, str], list[dict[str, str]], int]: + ) -> Union[ + None, str, list[str], dict[str, str], list[dict[str, str]], int + ]: """Return an option from the "[alembic]" or "[tool.alembic]" section of the configparser-parsed .ini file (e.g. ``alembic.ini``) or toml-parsed ``pyproject.toml`` file. @@ -470,7 +472,9 @@ class Config: def _get_toml_config_value( self, name: str, default: Optional[Any] = None - ) -> Union[None, str, list[str], dict[str, str], list[dict[str, str]], int]: + ) -> Union[ + None, str, list[str], dict[str, str], list[dict[str, str]], int + ]: USE_DEFAULT = object() value: Union[None, str, list[str], dict[str, str], int] = ( self.toml_alembic_config.get(name, USE_DEFAULT) diff --git a/tests/test_config.py b/tests/test_config.py index 72f5c101..2a1960a4 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -586,7 +586,9 @@ script_location = "%(here)s/scripts" sd = ScriptDirectory.from_config(cfg) eq_(getattr(sd, paramname), bool(argtype.true)) - @testing.variation("arg_type", ["int", "string_int", "omit", "wrong_value"]) + @testing.variation( + "arg_type", ["int", "string_int", "omit", "wrong_value"] + ) def test_truncate_slug_length_types( self, pyproject_only_env, arg_type: testing.Variation ): -- 2.47.3