Skip to content

Commit

Permalink
isort the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed May 5, 2024
1 parent da5a244 commit cc065e1
Show file tree
Hide file tree
Showing 82 changed files with 203 additions and 218 deletions.
2 changes: 1 addition & 1 deletion example-scripts/control-server/generate-cut-list.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import socket
import datetime
import socket
import sys

host = 'localhost'
Expand Down
6 changes: 3 additions & 3 deletions example-scripts/ffmpeg/record-all-audio-streams.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
import socket
import sys
import json
import logging
import shlex
import socket
import subprocess
import logging
import sys
from configparser import SafeConfigParser

logging.basicConfig(level=logging.DEBUG)
Expand Down
5 changes: 3 additions & 2 deletions example-scripts/gstreamer/ingest.py
Expand Up @@ -12,14 +12,15 @@
"""

import argparse
import gi
import os
import signal
import socket
import sys

import gi

gi.require_version('Gst', '1.0')
from gi.repository import Gst, GstNet, GObject
from gi.repository import GObject, Gst, GstNet

# init GObject & Co. before importing local classes
GObject.threads_init()
Expand Down
5 changes: 3 additions & 2 deletions example-scripts/gstreamer/source-background-loop.py
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
import os
import signal
import sys

import gi
import signal

gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject
from gi.repository import GObject, Gst

# init GObject & Co. before importing local classes
GObject.threads_init()
Expand Down
11 changes: 6 additions & 5 deletions example-scripts/gstreamer/source-nostream-music-from-folder.py
@@ -1,15 +1,16 @@
#!/usr/bin/env python3
import argparse
import logging
import os
import random
import signal
import sys

import gi
import signal
import random
import argparse
import logging
import pyinotify

gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject, GLib
from gi.repository import GLib, GObject, Gst

# init GObject & Co. before importing local classes
GObject.threads_init()
Expand Down
9 changes: 5 additions & 4 deletions example-scripts/gstreamer/source-remote-desktop-as-cam1.py
@@ -1,13 +1,14 @@
#!/usr/bin/python3
import argparse
import os
import sys
import gi
import signal
import argparse
import socket
import sys

import gi

gi.require_version('Gst', '1.0')
from gi.repository import Gst, GstNet, GObject
from gi.repository import GObject, Gst, GstNet

# init GObject & Co. before importing local classes
GObject.threads_init()
Expand Down
@@ -1,13 +1,14 @@
#!/usr/bin/python3
import argparse
import os
import sys
import gi
import signal
import argparse
import socket
import sys

import gi

gi.require_version('Gst', '1.0')
from gi.repository import Gst, GstNet, GObject
from gi.repository import GObject, Gst, GstNet

# init GObject & Co. before importing local classes
GObject.threads_init()
Expand Down
1 change: 0 additions & 1 deletion example-scripts/voctolight/lib/config.py
@@ -1,5 +1,4 @@
import logging

import os.path
from configparser import ConfigParser

Expand Down
5 changes: 3 additions & 2 deletions example-scripts/voctolight/voctolight.py
@@ -1,8 +1,9 @@
#!/usr/bin/env python3
import re
import socket
from lib.config import Config
import time
import re

from lib.config import Config

DO_GPIO = True
try:
Expand Down
2 changes: 1 addition & 1 deletion example-scripts/voctomidi/voctomidi.py
Expand Up @@ -4,9 +4,9 @@
import socket
import sys
import time
from rtmidi.midiutil import open_midiport

from lib.config import get_config
from rtmidi.midiutil import open_midiport

NOTE_ON = 0x90
NOTE_OFF = 0x80
Expand Down
2 changes: 1 addition & 1 deletion example-scripts/voctopanel/voctopanel.py
Expand Up @@ -3,8 +3,8 @@
import socket
import sys
import time
import serial

import serial
from lib.config import Config

server_address = Config.get("server", "address")
Expand Down
1 change: 0 additions & 1 deletion example-scripts/voctoremote/lib/config.py
@@ -1,5 +1,4 @@
import logging

import os.path
from configparser import ConfigParser

Expand Down
3 changes: 2 additions & 1 deletion example-scripts/voctoremote/voctoremote.py
@@ -1,8 +1,9 @@
#!/usr/bin/env python3

import socket

from flask import Flask, redirect, render_template, request, url_for
from lib.config import Config
from flask import Flask, render_template, request, redirect, url_for

app = Flask(__name__)

Expand Down
3 changes: 2 additions & 1 deletion vocto/__init__.py
Expand Up @@ -2,9 +2,10 @@
import gi

gi.require_version('Gst', '1.0')
from gi.repository import Gst
import os

from gi.repository import Gst

# set GST debug dir for dot files
if 'GST_DEBUG_DUMP_DOT_DIR' not in os.environ:
os.environ['GST_DEBUG_DUMP_DOT_DIR'] = os.getcwd()
Expand Down
4 changes: 2 additions & 2 deletions vocto/audio_codecs.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
import gi
import logging
import sys

from lib.config import Config
import gi
from gi.repository import Gst
from lib.config import Config

gi.require_version('GstController', '1.0')
log = logging.getLogger('audio_codecs')
Expand Down
2 changes: 1 addition & 1 deletion vocto/audio_streams.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import re
import logging
import re

log = logging.getLogger('AudioStreams')

Expand Down
10 changes: 4 additions & 6 deletions vocto/composites.py
@@ -1,16 +1,14 @@
#!/usr/bin/env python3
# for debug logging
import logging

# use Frame
from vocto.frame import Frame, X, Y, L, T, R, B

# for cloning objects
import copy

import logging
# for parsing configuration items
import re

# use Frame
from vocto.frame import B, Frame, L, R, T, X, Y

log = logging.getLogger('Composites')


Expand Down
5 changes: 3 additions & 2 deletions vocto/debug.py
@@ -1,8 +1,9 @@
#!/usr/bin/env python3
import os
import logging
from gi.repository import Gst
import os

import gi
from gi.repository import Gst

gi.require_version('Gst', '1.0')

Expand Down
3 changes: 1 addition & 2 deletions vocto/frame.py
@@ -1,9 +1,8 @@
#!/usr/bin/env python3
# for debug logging
import logging

# for cloning objects
import copy
import logging

# substitute array coordinate mappings fer better reading
X, Y = 0, 1
Expand Down
12 changes: 5 additions & 7 deletions vocto/transitions.py
@@ -1,14 +1,13 @@
#!/usr/bin/env python3
# for debug logging
# for cloning objects
import copy
import logging
from vocto.composites import Composite, Composites, swap_name
from vocto.frame import Frame, L, R, T, B, X, Y

# for calculating square roots
import math

# for cloning objects
import copy
from vocto.composites import Composite, Composites, swap_name
from vocto.frame import B, Frame, L, R, T, X, Y

V = 2 # distance (velocity) index

Expand Down Expand Up @@ -379,10 +378,9 @@ def bspline(points):
returns interpolated points
"""
# for generating B-Splines
from scipy import interpolate as spi

# for converting arrays
import numpy as np
from scipy import interpolate as spi

# parameter check
assert isinstance(points, np.ndarray)
Expand Down
4 changes: 2 additions & 2 deletions vocto/video_codecs.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
import logging
import gi
import sys

from lib.config import Config
import gi
from gi.repository import Gst
from lib.config import Config

gi.require_version('GstController', '1.0')

Expand Down
2 changes: 1 addition & 1 deletion voctocore/lib/audiomix.py
Expand Up @@ -2,9 +2,9 @@
import logging
from configparser import NoOptionError, NoSectionError

from lib.args import Args
from lib.config import Config
from lib.errors.configuration_error import ConfigurationError
from lib.args import Args


class AudioMix(object):
Expand Down
8 changes: 4 additions & 4 deletions voctocore/lib/avpreviewoutput.py
@@ -1,10 +1,10 @@
import logging

from vocto.video_codecs import construct_video_encoder_pipeline

from lib.tcpmulticonnection import TCPMultiConnection
from lib.config import Config
from lib.args import Args
from lib.config import Config
from lib.tcpmulticonnection import TCPMultiConnection

from vocto.video_codecs import construct_video_encoder_pipeline


class AVPreviewOutput(TCPMultiConnection):
Expand Down
5 changes: 2 additions & 3 deletions voctocore/lib/blinder.py
Expand Up @@ -2,10 +2,9 @@
import logging

from gi.repository import Gst

from lib.config import Config
from lib.clock import Clock
from lib.args import Args
from lib.clock import Clock
from lib.config import Config


class Blinder(object):
Expand Down
1 change: 1 addition & 0 deletions voctocore/lib/clock.py
@@ -1,5 +1,6 @@
#!/usr/bin/python3
import logging

from gi.repository import Gst, GstNet

__all__ = ['Clock', 'NetTimeProvider']
Expand Down
9 changes: 5 additions & 4 deletions voctocore/lib/commands.py
@@ -1,13 +1,14 @@
#!/usr/bin/env python3
import logging
import json
import inspect
import json
import logging
import os

from lib.config import Config
from lib.response import NotifyResponse, OkResponse

from vocto.command_helpers import dequote, quote, str2bool
from vocto.composite_commands import CompositeCommand
from vocto.command_helpers import quote, dequote, str2bool
import os


class ControlServerCommands(object):
Expand Down
4 changes: 2 additions & 2 deletions voctocore/lib/controlserver.py
@@ -1,10 +1,10 @@
import logging
from queue import Queue
from gi.repository import GObject

from gi.repository import GObject
from lib.commands import ControlServerCommands
from lib.tcpmulticonnection import TCPMultiConnection
from lib.response import NotifyResponse
from lib.tcpmulticonnection import TCPMultiConnection

from vocto.port import Port

Expand Down
3 changes: 2 additions & 1 deletion voctocore/lib/overlay.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
from gi.repository import Gst, GstController
import logging

import gi
from gi.repository import Gst, GstController

gi.require_version('GstController', '1.0')

Expand Down
1 change: 0 additions & 1 deletion voctocore/lib/pipeline.py
Expand Up @@ -4,7 +4,6 @@
import sys

from gi.repository import Gst

# import library components
from lib.args import Args
from lib.audiomix import AudioMix
Expand Down

0 comments on commit cc065e1

Please sign in to comment.