Commit bbe6758
refactor: extract shared utilities and improve code structure
- Create common/utils.py with FFmpegLocator, MediaFileValidator, MediaFormatter, FFmpegRunner
- Update audio-extractor, video-compressor, video-speed-changer, frame-extractor to use shared utilities
- Add comprehensive type hints across modified modules using from __future__ import annotations
- Add 41 tests for common utilities (tests/test_common.py)
- Update pyproject.toml with build-system, dependencies, optional-dependencies, and entry points
- Update existing test_video_speed_changer.py to use shared MediaFileValidator
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a553a60 commit bbe6758
9 files changed
Lines changed: 980 additions & 231 deletions
File tree
- audio-extractor
- common
- frame-extractor
- tests
- video-compressor
- video-speed-changer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | | - | |
20 | | - | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 24 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 25 | + | |
| 26 | + | |
61 | 27 | | |
62 | | - | |
| 28 | + | |
63 | 29 | | |
64 | 30 | | |
65 | 31 | | |
66 | 32 | | |
67 | 33 | | |
68 | 34 | | |
69 | | - | |
| 35 | + | |
70 | 36 | | |
71 | 37 | | |
72 | 38 | | |
| |||
165 | 131 | | |
166 | 132 | | |
167 | 133 | | |
168 | | - | |
| 134 | + | |
169 | 135 | | |
170 | 136 | | |
171 | 137 | | |
| |||
180 | 146 | | |
181 | 147 | | |
182 | 148 | | |
183 | | - | |
| 149 | + | |
184 | 150 | | |
185 | 151 | | |
186 | 152 | | |
187 | 153 | | |
188 | | - | |
| 154 | + | |
189 | 155 | | |
190 | 156 | | |
191 | | - | |
| 157 | + | |
192 | 158 | | |
193 | 159 | | |
194 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments