mirror of
https://github.com/iluvcapra/pycmx.git
synced 2026-10-01 17:27:33 +00:00
Ruff autofixes
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import pycmx
|
|
||||||
import re
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import logging
|
import pycmx
|
||||||
|
|
||||||
|
|
||||||
FORMAT = '%(asctime)-15s %(message)s'
|
FORMAT = '%(asctime)-15s %(message)s'
|
||||||
logging.basicConfig(format=FORMAT)
|
logging.basicConfig(format=FORMAT)
|
||||||
@@ -21,7 +20,7 @@ def all_video_edits(edl):
|
|||||||
|
|
||||||
|
|
||||||
def get_scene_name(edit, pattern):
|
def get_scene_name(edit, pattern):
|
||||||
scene_extractor = re.compile(pattern, re.I)
|
scene_extractor = re.compile(pattern, re.IGNORECASE)
|
||||||
if edit.clip_name is None:
|
if edit.clip_name is None:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
|
|||||||
+8
-8
@@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
#
|
||||||
# Configuration file for the Sphinx documentation builder.
|
# Configuration file for the Sphinx documentation builder.
|
||||||
#
|
#
|
||||||
@@ -15,14 +14,15 @@
|
|||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../..'))
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
project = u'pycmx'
|
project = 'pycmx'
|
||||||
copyright = u'(c) 2018-2025, Jamie Hardt'
|
copyright = '(c) 2018-2025, Jamie Hardt'
|
||||||
author = u'Jamie Hardt'
|
author = 'Jamie Hardt'
|
||||||
|
|
||||||
release = importlib.metadata.version("pycmx")
|
release = importlib.metadata.version("pycmx")
|
||||||
version = release
|
version = release
|
||||||
@@ -134,8 +134,8 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'pycmx.tex', u'pycmx Documentation',
|
(master_doc, 'pycmx.tex', 'pycmx Documentation',
|
||||||
u'Jamie Hardt', 'manual'),
|
'Jamie Hardt', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ latex_documents = [
|
|||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
(master_doc, 'pycmx', u'pycmx Documentation',
|
(master_doc, 'pycmx', 'pycmx Documentation',
|
||||||
[author], "3p")
|
[author], "3p")
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ man_pages = [
|
|||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'pycmx', u'pycmx Documentation',
|
(master_doc, 'pycmx', 'pycmx Documentation',
|
||||||
author, 'pycmx', 'One line description of project.',
|
author, 'pycmx', 'One line description of project.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ line-length = 88
|
|||||||
indent-width = 4
|
indent-width = 4
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "W"]
|
# select = ["E", "F", "W"]
|
||||||
|
|
||||||
[tool.ruff.format]
|
[tool.ruff.format]
|
||||||
docstring-code-line-length = 88
|
docstring-code-line-length = 88
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
"""
|
||||||
pycmx is a parser for CMX 3600-style EDLs.
|
pycmx is a parser for CMX 3600-style EDLs.
|
||||||
|
|
||||||
@@ -7,9 +6,9 @@ copy and reuse this software, refer to the LICENSE file included with the
|
|||||||
distribution.
|
distribution.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from .edit import Edit
|
||||||
|
from .event import Event
|
||||||
from .parse_cmx_events import parse_cmx3600
|
from .parse_cmx_events import parse_cmx3600
|
||||||
from .transition import Transition
|
from .transition import Transition
|
||||||
from .event import Event
|
|
||||||
from .edit import Edit
|
|
||||||
|
|
||||||
__all__ = ("parse_cmx3600", "Transition", "Event", "Edit")
|
__all__ = ("Edit", "Event", "Transition", "parse_cmx3600")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# pycmx
|
# pycmx
|
||||||
# (c) 2018-2025 Jamie Hardt
|
# (c) 2018-2025 Jamie Hardt
|
||||||
|
|
||||||
from re import (compile, match)
|
from re import compile, match
|
||||||
from typing import Dict, Tuple, Generator
|
from typing import Dict, Generator, Tuple
|
||||||
|
|
||||||
|
|
||||||
class ChannelMap:
|
class ChannelMap:
|
||||||
|
|||||||
+7
-7
@@ -1,21 +1,21 @@
|
|||||||
# pycmx
|
# pycmx
|
||||||
# (c) 2018-2025 Jamie Hardt
|
# (c) 2018-2025 Jamie Hardt
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from .cdl import AscSopComponents, FramecountTriple
|
from .cdl import AscSopComponents, FramecountTriple
|
||||||
|
from .channel_map import ChannelMap
|
||||||
from .statements import (
|
from .statements import (
|
||||||
|
StmtAudioExt,
|
||||||
StmtCdlSat,
|
StmtCdlSat,
|
||||||
StmtCdlSop,
|
StmtCdlSop,
|
||||||
StmtFrmc,
|
|
||||||
StmtEvent,
|
|
||||||
StmtAudioExt,
|
|
||||||
StmtClipName,
|
StmtClipName,
|
||||||
StmtSourceFile,
|
|
||||||
StmtEffectsName,
|
StmtEffectsName,
|
||||||
|
StmtEvent,
|
||||||
|
StmtFrmc,
|
||||||
|
StmtSourceFile,
|
||||||
)
|
)
|
||||||
from .transition import Transition
|
from .transition import Transition
|
||||||
from .channel_map import ChannelMap
|
|
||||||
|
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
|
|
||||||
class Edit:
|
class Edit:
|
||||||
|
|||||||
+10
-5
@@ -1,13 +1,18 @@
|
|||||||
# pycmx
|
# pycmx
|
||||||
# (c) 2018-2025 Jamie Hardt
|
# (c) 2018-2025 Jamie Hardt
|
||||||
|
|
||||||
from .statements import (StmtCorruptRemark, StmtTitle, StmtEvent,
|
|
||||||
StmtUnrecognized, StmtSourceUMID)
|
|
||||||
from .event import Event
|
|
||||||
from .channel_map import ChannelMap
|
|
||||||
|
|
||||||
from typing import Any, Generator
|
from typing import Any, Generator
|
||||||
|
|
||||||
|
from .channel_map import ChannelMap
|
||||||
|
from .event import Event
|
||||||
|
from .statements import (
|
||||||
|
StmtCorruptRemark,
|
||||||
|
StmtEvent,
|
||||||
|
StmtSourceUMID,
|
||||||
|
StmtTitle,
|
||||||
|
StmtUnrecognized,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class EditList:
|
class EditList:
|
||||||
"""
|
"""
|
||||||
|
|||||||
+13
-5
@@ -1,12 +1,20 @@
|
|||||||
# pycmx
|
# pycmx
|
||||||
# (c) 2023-2025 Jamie Hardt
|
# (c) 2023-2025 Jamie Hardt
|
||||||
|
|
||||||
from .statements import (StmtFrmc, StmtEvent, StmtClipName, StmtSourceFile,
|
from typing import Any, Generator, List, Optional, Tuple
|
||||||
StmtAudioExt, StmtUnrecognized, StmtEffectsName,
|
|
||||||
StmtCdlSop, StmtCdlSat)
|
|
||||||
from .edit import Edit
|
|
||||||
|
|
||||||
from typing import List, Generator, Optional, Tuple, Any
|
from .edit import Edit
|
||||||
|
from .statements import (
|
||||||
|
StmtAudioExt,
|
||||||
|
StmtCdlSat,
|
||||||
|
StmtCdlSop,
|
||||||
|
StmtClipName,
|
||||||
|
StmtEffectsName,
|
||||||
|
StmtEvent,
|
||||||
|
StmtFrmc,
|
||||||
|
StmtSourceFile,
|
||||||
|
StmtUnrecognized,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Event:
|
class Event:
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
from typing import TextIO
|
from typing import TextIO
|
||||||
|
|
||||||
from .parse_cmx_statements import (parse_cmx3600_statements)
|
|
||||||
from .edit_list import EditList
|
from .edit_list import EditList
|
||||||
|
from .parse_cmx_statements import parse_cmx3600_statements
|
||||||
|
|
||||||
|
|
||||||
def parse_cmx3600(f: TextIO, tolerant: bool = False) -> EditList:
|
def parse_cmx3600(f: TextIO, tolerant: bool = False) -> EditList:
|
||||||
|
|||||||
@@ -2,14 +2,25 @@
|
|||||||
# (c) 2018-2025 Jamie Hardt
|
# (c) 2018-2025 Jamie Hardt
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from typing import TextIO, List
|
from typing import List, TextIO
|
||||||
|
|
||||||
from .cdl import AscSopComponents, Rgb
|
from .cdl import AscSopComponents, Rgb
|
||||||
|
from .statements import (
|
||||||
from .statements import (StmtCdlSat, StmtCdlSop, StmtCorruptRemark, StmtFrmc,
|
StmtAudioExt,
|
||||||
StmtRemark, StmtTitle, StmtUnrecognized, StmtFCM,
|
StmtCdlSat,
|
||||||
StmtAudioExt, StmtClipName, StmtEffectsName,
|
StmtCdlSop,
|
||||||
StmtEvent, StmtSourceFile, StmtSplitEdit)
|
StmtClipName,
|
||||||
|
StmtCorruptRemark,
|
||||||
|
StmtEffectsName,
|
||||||
|
StmtEvent,
|
||||||
|
StmtFCM,
|
||||||
|
StmtFrmc,
|
||||||
|
StmtRemark,
|
||||||
|
StmtSourceFile,
|
||||||
|
StmtSplitEdit,
|
||||||
|
StmtTitle,
|
||||||
|
StmtUnrecognized,
|
||||||
|
)
|
||||||
from .util import collimate
|
from .util import collimate
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user