[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-04-05 00:02:55 +00:00
parent f9e3442560
commit 36f407ce59
1 changed files with 5 additions and 1 deletions

View File

@ -743,7 +743,11 @@ class FormattedExcinfo:
) -> List[str]:
"""Return formatted and marked up source lines."""
lines = []
if source is None or line_index >= len(source.lines) or line_index < -len(source.lines):
if (
source is None
or line_index >= len(source.lines)
or line_index < -len(source.lines)
):
source = Source("???")
line_index = 0
if line_index < 0: