Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
References: sqlalchemy#1509
  • Loading branch information
pristupa committed Jul 27, 2024
1 parent a4d2a1e commit b1465ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions alembic/script/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ def from_config(cls, config: Config) -> ScriptDirectory:
raise ValueError(
"'%s' is not a valid value for "
"version_path_separator; "
"expected 'space', 'newline', 'os', ':', ';'" % version_path_separator
"expected 'space', 'newline', 'os', ':', ';'"
% version_path_separator
) from ke
else:
if split_char is None:
Expand All @@ -211,7 +212,9 @@ def from_config(cls, config: Config) -> ScriptDirectory:
)
else:
version_locations = [
x.strip() 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
12 changes: 9 additions & 3 deletions alembic/testing/assertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class _ErrorContainer:


@contextlib.contextmanager
def _expect_raises(except_cls, msg=None, check_context=False, text_exact=False):
def _expect_raises(
except_cls, msg=None, check_context=False, text_exact=False
):
ec = _ErrorContainer()
if check_context:
are_we_already_in_a_traceback = sys.exc_info()[0]
Expand All @@ -101,8 +103,12 @@ def expect_raises(except_cls, check_context=True):
return _expect_raises(except_cls, check_context=check_context)


def expect_raises_message(except_cls, msg, check_context=True, text_exact=False):
return _expect_raises(except_cls, msg=msg, check_context=check_context, text_exact=text_exact)
def expect_raises_message(
except_cls, msg, check_context=True, text_exact=False
):
return _expect_raises(
except_cls, msg=msg, check_context=check_context, text_exact=text_exact
)


def eq_ignore_whitespace(a, b, msg=None):
Expand Down

0 comments on commit b1465ec

Please sign in to comment.