mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-06-25 06:22:41 +02:00
fix: flake8
This commit is contained in:
parent
b8ee2e9fb8
commit
29b362c8ce
38
.github/workflows/semantic-release.yaml
vendored
38
.github/workflows/semantic-release.yaml
vendored
@ -1,38 +0,0 @@
|
|||||||
name: Semantic Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
semantic-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: dev
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "lts/*"
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: npm clean-install
|
|
||||||
|
|
||||||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
|
|
||||||
run: npm audit signatures
|
|
||||||
|
|
||||||
- name: Run Semantic Release
|
|
||||||
run: npx semantic-release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -47,7 +47,7 @@ class Command(BaseCommand):
|
|||||||
with open(file_path, 'w') as f:
|
with open(file_path, 'w') as f:
|
||||||
f.write("translation_strings = {\n")
|
f.write("translation_strings = {\n")
|
||||||
for key, value in translation_strings_wip.items():
|
for key, value in translation_strings_wip.items():
|
||||||
f.write(f' "{key}": "{value}",\n')
|
f.write(f' "{key}": "{value}",\n') # noqa
|
||||||
f.write("}\n\n")
|
f.write("}\n\n")
|
||||||
|
|
||||||
f.write("replacement_strings = {\n")
|
f.write("replacement_strings = {\n")
|
||||||
|
@ -386,7 +386,7 @@ def produce_sprite_from_video(friendly_token):
|
|||||||
output_name = tmpdirname + "/sprites.jpg"
|
output_name = tmpdirname + "/sprites.jpg"
|
||||||
|
|
||||||
fps = getattr(settings, 'SPRITE_NUM_SECS', 10)
|
fps = getattr(settings, 'SPRITE_NUM_SECS', 10)
|
||||||
ffmpeg_cmd = [settings.FFMPEG_COMMAND, "-i", media.media_file.path, "-f", "image2", "-vf", f"fps=1/{fps}, scale=160:90", tmpdir_image_files]
|
ffmpeg_cmd = [settings.FFMPEG_COMMAND, "-i", media.media_file.path, "-f", "image2", "-vf", f"fps=1/{fps}, scale=160:90", tmpdir_image_files] # noqa
|
||||||
run_command(ffmpeg_cmd)
|
run_command(ffmpeg_cmd)
|
||||||
image_files = [f for f in os.listdir(tmpdirname) if f.startswith("img") and f.endswith(".jpg")]
|
image_files = [f for f in os.listdir(tmpdirname) if f.startswith("img") and f.endswith(".jpg")]
|
||||||
image_files = sorted(image_files, key=lambda x: int(re.search(r'\d+', x).group()))
|
image_files = sorted(image_files, key=lambda x: int(re.search(r'\d+', x).group()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user