Skip to content

Commit

Permalink
Fix ruff issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dunossauro committed Oct 14, 2023
1 parent 57aa9b4 commit 93867cc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vmh/kdenlive.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import xml.etree.ElementTree as ET
from itertools import islice, pairwise
from os import getcwd
from pathlib import Path
from typing import Literal, cast
from xml.etree import ElementTree

from loguru import logger
from parsel.selector import Selector
Expand Down Expand Up @@ -62,11 +62,11 @@ def kdenlive_xml(
overwrite: bool = False,
) -> str:

tree = ET.parse(path)
tree = ElementTree.parse(path)
root = tree.getroot()

playlist = root.find(f'./playlist[@id="{playlist_id}"]')
playlist = cast(ET.Element, playlist)
playlist = cast(ElementTree.Element, playlist)

playlist.clear()
playlist.attrib.update(id=playlist_id)
Expand All @@ -77,11 +77,11 @@ def kdenlive_xml(
'in': f'00:00:{_in:.3f}',
'out': f'00:00:{_out:.3f}',
}
entry = ET.SubElement(playlist, 'entry', attrib=entry_attribs)
entry = ElementTree.SubElement(playlist, 'entry', attrib=entry_attribs)

ET.SubElement(
ElementTree.SubElement(
entry, 'property', attrib={'name': 'kdenlive:id'}
).text=property_id
).text = property_id

if overwrite:
tree.write(path)
Expand Down

0 comments on commit 93867cc

Please sign in to comment.