diff --git a/alembic/script/base.py b/alembic/script/base.py index d05a54d6..d3cccf6c 100644 --- a/alembic/script/base.py +++ b/alembic/script/base.py @@ -211,7 +211,7 @@ def from_config(cls, config: Config) -> ScriptDirectory: ) else: version_locations = [ - x for x in version_locations_str.split(split_char) if x + x.strip() for x in version_locations_str.split(split_char) if x ] else: version_locations = None diff --git a/tests/test_config.py b/tests/test_config.py index b30f04cc..a5ac0172 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -137,7 +137,7 @@ def test_attributes_constructor(self): ( "multiline string 1", "newline", - "/foo\n/bar", + " /foo \n/bar ", ["/foo", "/bar"], ), (