[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] 2026-07-02 03:30:12 +00:00
commit dd792c6312
6 changed files with 16 additions and 5 deletions

View file

@ -296,7 +296,9 @@ def _compare(
if all(x == math.inf for x in xs):
return math.inf
vals = [
_PERFECT_MATCH_PSNR if x == math.inf else x for x in xs if math.isfinite(x) or x == math.inf
_PERFECT_MATCH_PSNR if x == math.inf else x
for x in xs
if math.isfinite(x) or x == math.inf
]
return round(sum(vals) / len(vals), 4) if vals else None