Skip to content

Commit

Permalink
Update dev dependencies (#117)
Browse files Browse the repository at this point in the history
* chore: update dev dependencies
* chore: reformat using latest ruff settings
  • Loading branch information
trin94 authored Feb 8, 2025
1 parent 701ccb3 commit 9fe995f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions mpvqc/services/mimetype_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ def video_file_glob_pattern(self):
if mime_type.name().startswith("video/"):
patterns.update(mime_type.globPatterns())

return f" ({" ".join(sorted(patterns))})"
return f" ({' '.join(sorted(patterns))})"

@cached_property
def subtitle_file_glob_pattern(self):
patterns = (f"*.{ext}" for ext in self.subtitle_file_extensions)
return f" ({" ".join(sorted(patterns))})"
return f" ({' '.join(sorted(patterns))})"

@cached_property
def subtitle_file_extensions(self) -> list[str]:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ classifiers = [

[project.optional-dependencies]
dev = [
"pytest>=8.3.3",
"ruff>=0.6.9",
"pytest>=8.3.4",
"ruff>=0.9.5",
]

[project.urls]
Expand Down
6 changes: 3 additions & 3 deletions test/pyobjects/comment_model/test_undo_redo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
def assert_comments(expected: list[list[Any]], actual: list[dict[str, Any]]):
assert len(expected) == len(actual)
for c_e, c_a in zip(expected, actual):
print(f"{c_e[0]} == {c_a["time"]}, ", end="")
print(f"{c_e[1]} == {c_a["commentType"]}, ", end="")
print(f"{c_e[2]} == {c_a["comment"]}")
print(f"{c_e[0]} == {c_a['time']}, ", end="")
print(f"{c_e[1]} == {c_a['commentType']}, ", end="")
print(f"{c_e[2]} == {c_a['comment']}")
assert c_e[0] == c_a["time"]
assert c_e[1] == c_a["commentType"]
assert c_e[2] == c_a["comment"]
Expand Down
8 changes: 4 additions & 4 deletions test/services/test_document_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_render_service_video_path_video_name(make_mock, document_render_service

make_mock(video=Path.home() / "video.mkv")
expected = textwrap.dedent(f"""\
video_path: {Path.home() / 'video.mkv'}
video_path: {Path.home() / "video.mkv"}
video_name: video.mkv
""")
actual = document_render_service.render(template)
Expand Down Expand Up @@ -176,7 +176,7 @@ def test_render_service_renders_partial_headers(make_mock, document_render_servi
f"""\
[FILE]
nick : ಠ_ಠ
path : {Path('/path/to/video')}
path : {Path("/path/to/video")}
[DATA]
# total lines: 0
Expand Down Expand Up @@ -223,7 +223,7 @@ def test_renderer_service_renders_backup(make_mock, document_render_service, res

rendered = document_render_service.render(resource_service.backup_template)

assert f'path : {Path("/path/to/video/ignore/user/setting")}' in rendered
assert f"path : {Path('/path/to/video/ignore/user/setting')}" in rendered
assert "[00:00:00] [Translation] My first comment" in rendered
assert "[00:00:50] [Spelling] My second comment" in rendered
assert "[00:01:40] [Phrasing] My third comment" in rendered
Expand Down Expand Up @@ -255,7 +255,7 @@ def test_backup_service_performs_backup(make_mock, zip_file, document_backup_ser

filename, content = writestr_mock.call_args.args
assert f"{datetime.now():%Y-%m-%d}" in filename
assert f'{Path("/path/to/nice/video")}' in content
assert f"{Path('/path/to/nice/video')}" in content
assert "[00:00:00] [Frrrranky] Suuuuuuuper" in content


Expand Down
6 changes: 3 additions & 3 deletions test/services/test_font_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ def test_fonts_loaded(qt_app):
loaded_font_families = QFontDatabase.families()

for font_family in verifiable_font_families:
assert (
font_family in loaded_font_families
), f"Cannot find font family '{font_family}' in loaded font families {loaded_font_families}"
assert font_family in loaded_font_families, (
f"Cannot find font family '{font_family}' in loaded font families {loaded_font_families}"
)

0 comments on commit 9fe995f

Please sign in to comment.