From ebc557009b5343be74d1ef8e3a9e1c9b44d24a8f Mon Sep 17 00:00:00 2001 From: Michael Schneeberger Date: Wed, 27 Mar 2024 14:52:22 +0100 Subject: format Python files with ruff --- polymatrix/utils/tooperatorexception.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'polymatrix/utils/tooperatorexception.py') 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) -- cgit v1.2.1