From b4fadbcf210dabfdd7c5cf68b3d0cc330c81b2d3 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 16 Jun 2024 18:01:56 -0400 Subject: [PATCH] fix isort profile --- .github/workflows/fmt.yml | 4 ++-- .github/workflows/lint.yml | 2 ++ GUI.py | 10 ++++++++-- main.py | 13 +++++++------ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml index 9919fd4..c09814a 100644 --- a/.github/workflows/fmt.yml +++ b/.github/workflows/fmt.yml @@ -21,12 +21,12 @@ jobs: - name: Run black check run: black --check . --line-length 101 - name: Run isort check - run: isort . --check-only + run: isort . --check-only --diff --profile black - name: If needed, commit changes to the pull request if: failure() run: | black . --line-length 101 - isort . + isort . --profile black git config --global user.name github-actions git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b944a9e..e93afee 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,3 +11,5 @@ jobs: with: options: "--line-length 101" - uses: isort/isort-action@v1 + with: + configuration: "--check-only --diff --profile black" diff --git a/GUI.py b/GUI.py index 299dcfe..4588083 100644 --- a/GUI.py +++ b/GUI.py @@ -3,8 +3,14 @@ from pathlib import Path # Used "tomlkit" instead of "toml" because it doesn't change formatting on "dump" import tomlkit -from flask import (Flask, redirect, render_template, request, - send_from_directory, url_for) +from flask import ( + Flask, + redirect, + render_template, + request, + send_from_directory, + url_for, +) import utils.gui_utils as gui diff --git a/main.py b/main.py index ba9b6f1..a2abddf 100755 --- a/main.py +++ b/main.py @@ -15,13 +15,14 @@ from utils.console import print_markdown, print_step, print_substep from utils.ffmpeg_install import ffmpeg_install from utils.id import id from utils.version import checkversion -from video_creation.background import (chop_background, - download_background_audio, - download_background_video, - get_background_config) +from video_creation.background import ( + chop_background, + download_background_audio, + download_background_video, + get_background_config, +) from video_creation.final_video import make_final_video -from video_creation.screenshot_downloader import \ - get_screenshots_of_reddit_posts +from video_creation.screenshot_downloader import get_screenshots_of_reddit_posts from video_creation.voices import save_text_to_mp3 __VERSION__ = "3.2.1"