diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c74936f..d682628 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,12 @@ repos: - id: name-tests-test - id: no-commit-to-branch - id: trailing-whitespace + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: "3.6.1" + hooks: + - id: editorconfig-checker + alias: ec + exclude: uv\.lock - repo: local hooks: - id: pyright diff --git a/aeonview.py b/aeonview.py index 4d2af2f..e8702cb 100644 --- a/aeonview.py +++ b/aeonview.py @@ -317,11 +317,12 @@ class AeonViewVideos: def _concatenate_videos( self, label: str, input_videos: list[Path], output_file: Path ) -> None: - """Concatenate multiple video files into one using ffmpeg concat demuxer. + """Concatenate video files into one using ffmpeg concat. - :param label: Human-readable label for log messages (e.g. "monthly video for 2025-04"). - :param input_videos: List of input video file paths to concatenate. - :param output_file: Path for the resulting concatenated video. + :param label: Human-readable label for log messages + (e.g. "monthly video for 2025-04"). + :param input_videos: Paths of input videos to concatenate. + :param output_file: Path for the resulting video. """ logging.info("Generating %s", label) logging.info("Output file will be %s", output_file) @@ -350,7 +351,7 @@ class AeonViewVideos: class AeonViewHelpers: - """Utility methods for path manipulation, argument parsing, and ffmpeg commands.""" + """Utility methods for paths, argument parsing, and ffmpeg.""" @staticmethod def check_date(year: int, month: int, day: int) -> bool: @@ -501,7 +502,7 @@ class AeonViewHelpers: :param input_files: List of input video file paths. :param output_file: Path to the output video file. - :return: Tuple of (ffmpeg command list, temporary concat list file path). + :return: Tuple of (command list, temp concat file path). """ concat_list = tempfile.NamedTemporaryFile( mode="w", suffix=".txt", delete=False diff --git a/aeonview_test.py b/aeonview_test.py index 60998d3..d5cab68 100644 --- a/aeonview_test.py +++ b/aeonview_test.py @@ -47,13 +47,13 @@ def make_video_args( @contextlib.contextmanager def expect_error_exit(): - """Context manager that expects ``SystemExit`` and silences ``logging.error``.""" + """Expect ``SystemExit`` and silence ``logging.error``.""" with pytest.raises(SystemExit), mock.patch("aeonview.logging.error"): yield def make_app_with_project(tmp: str) -> tuple[AeonViewApp, Path]: - """Create an ``AeonViewApp`` whose base_path points at *tmp* with a 'proj' dir.""" + """Create an ``AeonViewApp`` with base_path at *tmp*/'proj'.""" app = AeonViewApp() app.base_path = Path(tmp).resolve() proj_path = app.base_path / "proj" @@ -456,7 +456,7 @@ def test_generate_monthly_video(mock_subprocess_run): @mock.patch("subprocess.run") def test_generate_monthly_video_excludes_output_file(mock_subprocess_run): - """Verify that the monthly output file is excluded from the input list on re-runs.""" + """Verify monthly output file is excluded from inputs on re-runs.""" captured_content = {} def capture_concat(cmd, **_kwargs):