style: apply ruff lint fixes and formatting to figment modules

Fixes: unused imports, import sorting, unused variable, overly broad
exception type in test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 11:09:46 -07:00
parent 4cf316c280
commit 2bfd3a01da
5 changed files with 20 additions and 21 deletions

View File

@@ -2,17 +2,11 @@
import os
from enum import Enum
from unittest.mock import patch
import pytest
from effects_plugins.figment import FigmentEffect, FigmentPhase, FigmentState
from engine.effects.types import EffectConfig, EffectContext
FIXTURE_SVG = os.path.join(
os.path.dirname(__file__), "fixtures", "test.svg"
)
FIXTURE_SVG = os.path.join(os.path.dirname(__file__), "fixtures", "test.svg")
FIGMENTS_DIR = os.path.join(os.path.dirname(__file__), "fixtures")
@@ -104,12 +98,10 @@ class TestFigmentStateMachine:
assert state.phase == FigmentPhase.REVEAL
# Advance enough frames to get through all phases
last_state = None
for frame in range(2, 100):
state = effect.get_figment_state(frame, 40, 20)
if state is None:
break
last_state = state
# Should have completed the full cycle back to idle
assert state is None

View File

@@ -31,7 +31,8 @@ class TestRasterizeSvg:
def test_nonexistent_file_raises(self):
import pytest
with pytest.raises(Exception):
with pytest.raises((FileNotFoundError, OSError)):
rasterize_svg("/nonexistent/file.svg", 40, 20)