diff options
author | Michael Schneeberger <michael.schneeberger@fhnw.ch> | 2024-03-27 14:52:22 +0100 |
---|---|---|
committer | Michael Schneeberger <michael.schneeberger@fhnw.ch> | 2024-03-27 14:52:22 +0100 |
commit | ebc557009b5343be74d1ef8e3a9e1c9b44d24a8f (patch) | |
tree | c1e6c67fb86e7afd864b3188db6829a463b47aba /polymatrix/utils/tooperatorexception.py | |
parent | add minimal documentation to the expression mixins (diff) | |
download | polymatrix-ebc557009b5343be74d1ef8e3a9e1c9b44d24a8f.tar.gz polymatrix-ebc557009b5343be74d1ef8e3a9e1c9b44d24a8f.zip |
format Python files with ruff
Diffstat (limited to 'polymatrix/utils/tooperatorexception.py')
-rw-r--r-- | polymatrix/utils/tooperatorexception.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/polymatrix/utils/tooperatorexception.py b/polymatrix/utils/tooperatorexception.py index 5f7db0f..1c84be7 100644 --- a/polymatrix/utils/tooperatorexception.py +++ b/polymatrix/utils/tooperatorexception.py @@ -2,13 +2,16 @@ from polymatrix.utils.getstacklines import FrameSummary def to_operator_exception( - message: str, - stack: tuple[FrameSummary], + message: str, + stack: tuple[FrameSummary], ) -> str: exception_lines = [ message, - f' Assertion traceback (most recent call last):', - *(f' File "{stack_line.filename}", line {stack_line.lineno}\n {stack_line.line}' for stack_line in stack), + f" Assertion traceback (most recent call last):", + *( + f' File "{stack_line.filename}", line {stack_line.lineno}\n {stack_line.line}' + for stack_line in stack + ), ] - return '\n'.join(exception_lines) + return "\n".join(exception_lines) |