Skip to content

Commit ca561b6

Browse files
ACK1Dzerolab
andauthored
Fix missing space in ru translation (#245)
* Fix missing space in translation * fix ruff linting Co-authored-by: Dan Braghiș <[email protected]>
1 parent bdf0f29 commit ca561b6

File tree

8 files changed

+9
-7
lines changed

8 files changed

+9
-7
lines changed

.github/report_nightly_build_failure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
This reports an error to the #nightly-build-failures Slack channel.
55
"""
6+
67
import os
78

89
import requests

.github/workflows/ruff.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- run: python -Im pip install --user ruff
18+
- run: python -Im pip install --user ruff==0.5.4
1919

2020
- name: Run ruff
2121
working-directory: ./src
22-
run: ruff --output-format=github wagtailmedia
22+
run: ruff check --output-format=github wagtailmedia

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: 'v0.2.0'
21+
rev: 'v0.5.4'
2222
hooks:
2323
- id: ruff
2424
args: [--fix, --exit-non-zero-on-fix]

src/wagtailmedia/locale/ru/LC_MESSAGES/django.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ msgstr[0] ""
182182
"<span>%(total)s</span> Медиафайл <span class=\"visuallyhidden w-sr-only\"> "
183183
"создан на %(site_name)s</span>"
184184
msgstr[1] ""
185-
"<span>%(total)s</span> Медиафайлы <span class=\"visuallyhiddenw-sr-only\"> "
185+
"<span>%(total)s</span> Медиафайлы <span class=\"visuallyhidden w-sr-only\"> "
186186
"созданы на %(site_name)s</span>"
187187

188188
#: src/wagtailmedia/templates/wagtailmedia/media/_file_field.html:4

src/wagtailmedia/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
This module provides the `wagtailmedia_settings` object, that is used to access
99
the settings. It checks for user settings first, with fallback to defaults.
1010
"""
11+
1112
import warnings
1213

1314
from django.conf import settings

tests/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
CACHES = {
9595
"default": {
9696
"BACKEND": "redis_cache.RedisCache",
97-
"LOCATION": "localhost:%s" % REDIS_PORT,
97+
"LOCATION": f"localhost:{REDIS_PORT}",
9898
},
9999
}
100100
else:

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_basic(self):
7373
media = Media.objects.get(pk=item["id"])
7474
# Check download_url
7575
self.assertEqual(
76-
item["meta"]["download_url"], "http://localhost/media/%s" % media.file
76+
item["meta"]["download_url"], f"http://localhost/media/{media.file}"
7777
)
7878

7979
self.assertEqual(item["media_type"], media.type)

tests/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
path("", include(wagtail_urls)),
1919
] + [
2020
path(
21-
"%s<path:path>" % prefix.lstrip("/"),
21+
f"{prefix.lstrip('/')}<path:path>",
2222
serve,
2323
kwargs={"document_root": document_root},
2424
)

0 commit comments

Comments
 (0)