Skip to content

Commit

Permalink
Strip leading and trailing spaces in version locations
Browse files Browse the repository at this point in the history
References: sqlalchemy#1509
  • Loading branch information
pristupa committed Jul 25, 2024
1 parent 6f1e86f commit 00a1a04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alembic/script/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_attributes_constructor(self):
(
"multiline string 1",
"newline",
"/foo\n/bar",
" /foo \n/bar ",
["/foo", "/bar"],
),
(
Expand Down

0 comments on commit 00a1a04

Please sign in to comment.