Skip to content

Commit

Permalink
Sorts imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Jan 12, 2024
1 parent a006d57 commit 271c9f0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
5 changes: 3 additions & 2 deletions otto/log.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import logging
from otto.config import LOG_DIR
import sys
import os
import sys
from time import strftime

from otto.config import LOG_DIR


def ts():
return strftime('%Y%m%d-%H%M%S')
Expand Down
4 changes: 2 additions & 2 deletions otto/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
This initializes the main FastAPI `app` and attaches all routes to it.
"""
from fastapi import FastAPI

from otto import __version__, templates
from otto.preview import previewAPI
from otto import templates
from otto import __version__

app = FastAPI()
"""# The main app"""
Expand Down
3 changes: 2 additions & 1 deletion otto/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Generic model classes for media and template data
"""

from typing import List, Literal, Optional, Tuple, Union

from pydantic import BaseModel
from typing import List, Tuple, Optional, Union, Literal


class FX(BaseModel):
Expand Down
8 changes: 5 additions & 3 deletions otto/preview.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from os.path import join

from fastapi import APIRouter

from otto.config import DATA_DIR
from otto.getdata import timestr
from otto.models import Edl, Render
from otto.render import generateEdl
from otto.getdata import timestr
from os.path import join
from otto.config import DATA_DIR

previewAPI = APIRouter()

Expand Down
7 changes: 4 additions & 3 deletions otto/render.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from moviepy.editor import VideoFileClip, AudioFileClip, ImageClip
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip
from moviepy.audio.AudioClip import CompositeAudioClip
from moviepy.editor import AudioFileClip, ImageClip, VideoFileClip
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip

from otto import templates
from otto.exceptions import EdlException, EmptyClipsException
from otto.getdata import download
from otto.models import Edl
from otto.exceptions import EmptyClipsException, EdlException


def generateEdl(edl: Edl, moviesize=(1920, 1080), audio=None, **kwargs):
Expand Down
5 changes: 3 additions & 2 deletions otto/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
Prebuilt Template blocks, designed to be rendered to Clips
"""

from moviepy.editor import TextClip, ColorClip
from moviepy.editor import ColorClip, TextClip
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip
from moviepy.video.compositing.concatenate import concatenate_videoclips
from otto.colortransitions import makeColor, boxReveal, boxShrink, drawBoxOutline

from otto import colortransitions as ct
from otto.colortransitions import boxReveal, boxShrink, drawBoxOutline, makeColor
from otto.config import defaults
from otto.utils import rgbToDec

Expand Down

0 comments on commit 271c9f0

Please sign in to comment.