From 878bdcc8c8056fc66eb11fd6c1283a4bc4f539d8 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 16 Dec 2025 12:18:50 -0800 Subject: [PATCH] Made statement imports explicit --- pycmx/edit.py | 4 ++-- pycmx/parse_cmx_statements.py | 11 +++++++---- tests/test_parse.py | 1 - 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pycmx/edit.py b/pycmx/edit.py index bb67be7..d9583b0 100644 --- a/pycmx/edit.py +++ b/pycmx/edit.py @@ -138,14 +138,14 @@ class Edit: else: return self.clip_name_statement.name - @property + @property def asc_sop(self) -> Optional[StmtCdlSop]: """ Get ASC CDL Slope-Offset-Power transfer function for clip, if present """ return self.asc_sop_statement - @property + @property def asc_sat(self) -> Optional[StmtCdlSat]: """ Get ASC CDL saturation value for clip, if present diff --git a/pycmx/parse_cmx_statements.py b/pycmx/parse_cmx_statements.py index 068eb72..5e09b19 100644 --- a/pycmx/parse_cmx_statements.py +++ b/pycmx/parse_cmx_statements.py @@ -2,10 +2,13 @@ # (c) 2018 Jamie Hardt import re -from collections import namedtuple -from typing import Any, TextIO, List +from typing import TextIO, List -from .statements import * +from .statements import (StmtCdlSat, StmtCdlSop, StmtFrmc, StmtRemark, + StmtTitle, StmtUnrecognized, StmtFCM, StmtAudioExt, + StmtClipName, StmtEffectsName, StmtEvent, + StmtSourceFile, StmtSplitEdit, StmtMotionMemory, + StmtSourceUMID) from .util import collimate @@ -107,7 +110,7 @@ def _parse_remark(line, line_number) -> object: group_patterns: list[str] = re.findall(r'\((.*?)\)', line) v1: list[list[tuple[str, str]]] = [re.findall(r'(-?\d+(\.\d+)?)', a) for - a in group_patterns] + a in group_patterns] v: list[list[str]] = [[a[0] for a in b] for b in v1] diff --git a/tests/test_parse.py b/tests/test_parse.py index 97db130..2ba4e9a 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -160,4 +160,3 @@ class TestParse(TestCase): for event in edl.events: if event.number == 1: ... -