Skip to content

Commit

Permalink
Sort the Python imports with isort
Browse files Browse the repository at this point in the history
  • Loading branch information
peternewman committed Dec 6, 2022
1 parent 41584fa commit f82bbc5
Show file tree
Hide file tree
Showing 49 changed files with 157 additions and 85 deletions.
1 change: 1 addition & 0 deletions data/rdm/PidDataTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import os
import unittest

from ola import PidStore

__author__ = 'nomis52@gmail.com (Simon Newton)'
Expand Down
1 change: 1 addition & 0 deletions include/ola/gen_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@


from __future__ import print_function

import textwrap


Expand Down
5 changes: 4 additions & 1 deletion python/examples/ola_artnet_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
"""Fetch some ArtNet parameters."""

from __future__ import print_function

import sys

from ola.ClientWrapper import ClientWrapper

from ola import ArtNetConfigMessages_pb2
import sys

__author__ = 'nomis52@gmail.com (Simon Newton)'

Expand Down
4 changes: 3 additions & 1 deletion python/examples/ola_candidate_ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"""List candidate ports for patching."""

from __future__ import print_function
from ola.ClientWrapper import ClientWrapper

import argparse
import sys

from ola.ClientWrapper import ClientWrapper

__author__ = 'simon.marchi@polymtl.ca (Simon Marchi)'

wrapper = None
Expand Down
4 changes: 3 additions & 1 deletion python/examples/ola_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"""Lists the devices / ports."""

from __future__ import print_function
from ola.ClientWrapper import ClientWrapper

import sys

from ola.ClientWrapper import ClientWrapper

__author__ = 'nomis52@gmail.com (Simon Newton)'

wrapper = None
Expand Down
6 changes: 4 additions & 2 deletions python/examples/ola_fetch_dmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"""Gets a current frame of DMX for a universe."""

from __future__ import print_function
from ola.ClientWrapper import ClientWrapper

import getopt
import textwrap
import sys
import textwrap

from ola.ClientWrapper import ClientWrapper

__author__ = 'nomis52@gmail.com (Simon Newton)'

Expand Down
6 changes: 4 additions & 2 deletions python/examples/ola_patch_unpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
"""Patch and unpatch ports."""

from __future__ import print_function
from ola.ClientWrapper import ClientWrapper
from ola.OlaClient import OlaClient

import argparse
import sys

from ola.ClientWrapper import ClientWrapper
from ola.OlaClient import OlaClient

__author__ = 'simon.marchi@polymtl.ca (Simon Marchi)'

wrapper = None
Expand Down
6 changes: 4 additions & 2 deletions python/examples/ola_plugin_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"""Lists the loaded plugins."""

from __future__ import print_function
from ola.ClientWrapper import ClientWrapper

import getopt
import textwrap
import sys
import textwrap

from ola.ClientWrapper import ClientWrapper

__author__ = 'nomis52@gmail.com (Simon Newton)'

Expand Down
4 changes: 3 additions & 1 deletion python/examples/ola_rdm_discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
'''Show the UIDs for a universe.'''

from __future__ import print_function

import getopt
import textwrap
import sys
import textwrap

from ola.ClientWrapper import ClientWrapper

__author__ = 'nomis52@gmail.com (Simon Newton)'
Expand Down
5 changes: 4 additions & 1 deletion python/examples/ola_rdm_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@
'''Get a PID from a UID.'''

from __future__ import print_function

import cmd
import getopt
import os.path
import readline
import sys
import textwrap
from ola import PidStore

from ola.ClientWrapper import ClientWrapper
from ola.OlaClient import OlaClient, RDMNack
from ola.RDMAPI import RDMAPI
from ola.UID import UID

from ola import PidStore

__author__ = 'nomis52@gmail.com (Simon Newton)'


Expand Down
3 changes: 2 additions & 1 deletion python/examples/ola_recv_dmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
"""Receive DMX data."""

import getopt
import textwrap
import sys
import textwrap

from ola.ClientWrapper import ClientWrapper

__author__ = 'nomis52@gmail.com (Simon Newton)'
Expand Down
4 changes: 3 additions & 1 deletion python/examples/ola_send_dmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"""Send some DMX data."""

from __future__ import print_function
from ola.ClientWrapper import ClientWrapper

import array
import sys

from ola.ClientWrapper import ClientWrapper

__author__ = 'nomis52@gmail.com (Simon Newton)'

wrapper = None
Expand Down
5 changes: 3 additions & 2 deletions python/examples/ola_simple_fade.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
# Copyright (C) 2014 Sean Sill

from array import array

from ola.ClientWrapper import ClientWrapper
from ola.DMXConstants import DMX_MIN_SLOT_VALUE, DMX_MAX_SLOT_VALUE, \
DMX_UNIVERSE_SIZE
from ola.DMXConstants import (DMX_MAX_SLOT_VALUE, DMX_MIN_SLOT_VALUE,
DMX_UNIVERSE_SIZE)

__author__ = 'Sean Sill'

Expand Down
4 changes: 3 additions & 1 deletion python/examples/ola_universe_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"""Lists the active universes."""

from __future__ import print_function

import sys

from ola.ClientWrapper import ClientWrapper
from ola.OlaClient import Universe
import sys

__author__ = 'nomis52@gmail.com (Simon Newton)'

Expand Down
1 change: 1 addition & 0 deletions python/examples/rdm_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import tempfile
import textwrap
import webbrowser

from ola.UID import UID

'''Compare the RDM configurations saves with rdm_snapshot.py'''
Expand Down
4 changes: 3 additions & 1 deletion python/examples/rdm_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
import pprint
import sys
import textwrap
from ola import PidStore

from ola.ClientWrapper import ClientWrapper
from ola.OlaClient import OlaClient, RDMNack
from ola.RDMAPI import RDMAPI
from ola.UID import UID

from ola import PidStore

'''Quick script to collect the settings from a rig.'''

__author__ = 'nomis52@gmail.com (Simon Newton)'
Expand Down
1 change: 1 addition & 0 deletions python/ola/ClientWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import termios
import threading
import traceback

from ola.OlaClient import OlaClient

"""A simple client wrapper for the OlaClient."""
Expand Down
5 changes: 2 additions & 3 deletions python/ola/ClientWrapperTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
import socket
# import timeout_decorator
import unittest
from ola.ClientWrapper import ClientWrapper
from ola.ClientWrapper import _Event
from ola.TestUtils import handleRPCByteOrder

from ola.ClientWrapper import ClientWrapper, _Event
from ola.TestUtils import handleRPCByteOrder

"""Test cases for the Event and Event loop of ClientWrapper class."""

Expand Down
1 change: 1 addition & 0 deletions python/ola/DUBDecoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Copyright (C) 2012 Simon Newton

import itertools

from ola.UID import UID

"""Decodes a DUB response."""
Expand Down
1 change: 1 addition & 0 deletions python/ola/DUBDecoderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (C) Simon Newton

import unittest

from ola.DUBDecoder import DecodeResponse

"""Test cases for the DUBDecoder class."""
Expand Down
3 changes: 2 additions & 1 deletion python/ola/MACAddressTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

import sys
import unittest

from ola.MACAddress import MACAddress
from ola.TestUtils import allNotEqual, allHashNotEqual
from ola.TestUtils import allHashNotEqual, allNotEqual

"""Test cases for the MACAddress class."""

Expand Down
6 changes: 4 additions & 2 deletions python/ola/OlaClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
import socket
import struct
import sys
from ola.rpc.StreamRpcChannel import StreamRpcChannel

from ola.rpc.SimpleRpcController import SimpleRpcController
from ola import Ola_pb2
from ola.rpc.StreamRpcChannel import StreamRpcChannel
from ola.UID import UID

from ola import Ola_pb2

"""The client used to communicate with the Ola Server."""

__author__ = 'nomis52@gmail.com (Simon Newton)'
Expand Down
5 changes: 3 additions & 2 deletions python/ola/OlaClientTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
# Copyright (C) 2019 Bruce Lowekamp

import unittest
from ola.OlaClient import Plugin, Device, Port, Universe, RDMNack
from ola.TestUtils import allNotEqual, allHashNotEqual

from ola.OlaClient import Device, Plugin, Port, RDMNack, Universe
from ola.TestUtils import allHashNotEqual, allNotEqual

"""Test cases for data structures of OlaClient.
SendDMX is tested with ClientWrapper."""
Expand Down
7 changes: 4 additions & 3 deletions python/ola/PidStore.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@
# Holds all the information about RDM PIDs

from __future__ import print_function

import binascii
import math
import os
import socket
import struct
import sys

from google.protobuf import text_format
from ola import PidStoreLocation
from ola import Pids_pb2
from ola.MACAddress import MACAddress
from ola import RDMConstants
from ola.UID import UID

from ola import Pids_pb2, PidStoreLocation, RDMConstants

"""The PID Store."""

__author__ = 'nomis52@gmail.com (Simon Newton)'
Expand Down
3 changes: 2 additions & 1 deletion python/ola/PidStoreTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
import binascii
import os
import unittest

import ola.PidStore as PidStore
from ola.TestUtils import allNotEqual, allHashNotEqual
from ola.TestUtils import allHashNotEqual, allNotEqual

"""Test cases for the PidStore class.
Relies on the PID data from RDM tests in the directory
Expand Down
3 changes: 3 additions & 0 deletions python/ola/RDMAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
# Copyright (C) 2010 Simon Newton

from __future__ import print_function

import sys

from ola.OlaClient import OlaClient

from ola import PidStore

"""The Python RDM API."""
Expand Down
5 changes: 3 additions & 2 deletions python/ola/RDMTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
import socket
# import timeout_decorator
import unittest
from ola import PidStore

from ola.ClientWrapper import ClientWrapper
from ola.OlaClient import RDMNack
from ola.RDMAPI import RDMAPI
from ola.UID import UID
from ola.TestUtils import handleRPCByteOrder
from ola.UID import UID

from ola import PidStore

"""Test cases for RDM device commands."""

Expand Down
3 changes: 2 additions & 1 deletion python/ola/UIDTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
# Copyright (C) 2005 Simon Newton

import unittest

from ola.TestUtils import allHashNotEqual, allNotEqual
from ola.UID import UID, UIDOutOfRangeException
from ola.TestUtils import allNotEqual, allHashNotEqual

"""Test cases for the UID class."""

Expand Down
1 change: 1 addition & 0 deletions python/ola/rpc/SimpleRpcControllerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (C) 2005 Simon Newton

import unittest

from SimpleRpcController import SimpleRpcController

"""Test cases for the SimpleRpcController."""
Expand Down
1 change: 1 addition & 0 deletions python/ola/rpc/StreamRpcChannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import binascii
import logging
import struct

from google.protobuf import service
from ola.rpc import Rpc_pb2
from ola.rpc.SimpleRpcController import SimpleRpcController
Expand Down
1 change: 1 addition & 0 deletions scripts/enforce_licence.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (C) 2013 Simon Newton

from __future__ import print_function

import difflib
import getopt
import glob
Expand Down

0 comments on commit f82bbc5

Please sign in to comment.