From dbe137042554490529bfb86c89fb0d667454427c Mon Sep 17 00:00:00 2001 From: EJClaw Date: Fri, 25 Sep 2026 23:38:34 +0900 Subject: [PATCH] =?UTF-8?q?style:=20models=20=ED=8C=A8=ED=82=A4=EC=A7=80?= =?UTF-8?q?=20ruff=20=EC=9C=84=EB=B0=98=20=EC=A0=95=EB=A6=AC=20(import=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC,=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20?= =?UTF-8?q?=EB=94=B0=EC=98=B4=ED=91=9C=20=ED=83=80=EC=9E=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .gitignore 가 src/livesub/models 를 통째로 무시하던 동안 이 8개 파일 1,674줄은 커밋에서만 빠진 게 아니라 ruff 검사 범위에서도 빠져 있었다 (ruff 는 기본적으로 .gitignore 를 존중한다). 추적 대상이 되면서 처음 검사에 들어와 나온 2건이다. 같은 파일들에 대해 확인한 것: 프로젝트 룰셋 통과, 전체 룰(--select ALL) 감사에서 정확성 계열(F/E9/PLE) 위반 없음 — 남는 건 프로젝트가 켜지 않은 문서화/스타일 룰뿐, 7개 모듈 import 스모크 전부 통과, tests 10개 파일이 이미 models 를 임포트해 실행 범위에는 들어 있었다. --- src/livesub/models/__init__.py | 14 +++++++------- src/livesub/models/glossary.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/livesub/models/__init__.py b/src/livesub/models/__init__.py index 22c901c..5ee44e9 100644 --- a/src/livesub/models/__init__.py +++ b/src/livesub/models/__init__.py @@ -3,6 +3,13 @@ from .asr import SpeechRecognizer, Transcript from .glossary import Glossary, GlossaryEntry from .manager import GpuInfo, ModelManager, detect_gpu +from .speech_level import ( + Politeness, + SpeechLevel, + apply_speech_level, + detect_politeness, + to_casual, +) from .tiers import ( DEFAULT_TIER, TIERS, @@ -12,13 +19,6 @@ from .tiers import ( get_tier, ordered_tiers, ) -from .speech_level import ( - Politeness, - SpeechLevel, - apply_speech_level, - detect_politeness, - to_casual, -) from .translator import Translator, build_seedx_prompt, create_translator __all__ = [ diff --git a/src/livesub/models/glossary.py b/src/livesub/models/glossary.py index b38726f..f6d3e90 100644 --- a/src/livesub/models/glossary.py +++ b/src/livesub/models/glossary.py @@ -64,7 +64,7 @@ class Glossary: # --- 영속화 -------------------------------------------------------- @classmethod - def load(cls, path: str | Path, case_sensitive: bool = False) -> "Glossary": + def load(cls, path: str | Path, case_sensitive: bool = False) -> Glossary: p = Path(path) if not p.is_file(): return cls(case_sensitive=case_sensitive)