2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Adapt to flake8-import-order

https://review.openstack.org/#/c/432906/
flake8-import-order adds 3 new flake8 warnings:
I100: Your import statements are in the wrong order.
I101: The names in your from import are in the wrong order.
I201: Missing newline between sections or imports.

Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
xurong00037997
2017-02-24 10:03:26 +08:00
committed by Ben Pfaff
parent 5575908b01
commit 6c7050b59c
29 changed files with 108 additions and 82 deletions

View File

@@ -16,17 +16,16 @@ import functools
import re
import uuid
import six
import ovs.poller
import ovs.socket_util
import ovs.db.parser
import ovs.db.types
import ovs.json
import ovs.jsonrpc
import ovs.ovsuuid
import ovs.db.parser
import ovs.poller
import ovs.socket_util
from ovs.db import error
import ovs.db.types
import six
class ConstraintViolation(error.Error):

View File

@@ -15,16 +15,16 @@
import functools
import uuid
import six
import ovs.jsonrpc
import ovs.db.data as data
import ovs.db.parser
import ovs.db.schema
from ovs.db import error
import ovs.jsonrpc
import ovs.ovsuuid
import ovs.poller
import ovs.vlog
from ovs.db import error
import six
vlog = ovs.vlog.Vlog("idl")

View File

@@ -14,10 +14,10 @@
import re
import six
from ovs.db import error
import six
class Parser(object):
def __init__(self, json, name):

View File

@@ -15,11 +15,11 @@
import re
import sys
import six
from ovs.db import error
import ovs.db.parser
import ovs.db.types
from ovs.db import error
import six
def _check_id(name, json):

View File

@@ -15,12 +15,12 @@
import sys
import uuid
import six
from ovs.db import error
import ovs.db.parser
import ovs.db.data
import ovs.db.parser
import ovs.ovsuuid
from ovs.db import error
import six
class AtomicType(object):

View File

@@ -13,11 +13,15 @@
# limitations under the License.
import errno
import win32con
import win32file
import pywintypes
import msvcrt
import pywintypes
import win32con
import win32file
LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK
LOCK_SH = 0 # the default
LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY

View File

@@ -13,6 +13,7 @@
# limitations under the License.
from __future__ import absolute_import
import functools
import json
import re

View File

@@ -16,8 +16,6 @@ import errno
import os
import sys
import six
import ovs.json
import ovs.poller
import ovs.reconnect
@@ -26,6 +24,8 @@ import ovs.timeval
import ovs.util
import ovs.vlog
import six
EOF = ovs.util.EOF
vlog = ovs.vlog.Vlog("jsonrpc")

View File

@@ -15,12 +15,12 @@
import re
import uuid
import ovs.db.parser
from ovs.db import error
import six
from six.moves import range
from ovs.db import error
import ovs.db.parser
uuidRE = re.compile("^xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx$"
.replace('x', '[0-9a-fA-F]'))

View File

@@ -13,13 +13,15 @@
# limitations under the License.
import errno
import ovs.timeval
import ovs.vlog
import os
import select
import socket
import os
import sys
import ovs.timeval
import ovs.vlog
if sys.platform == "win32":
import ovs.winutils as winutils

View File

@@ -14,8 +14,8 @@
import os
import ovs.vlog
import ovs.util
import ovs.vlog
# Values returned by Reconnect.run()
CONNECT = 'connect'

View File

@@ -19,13 +19,13 @@ import random
import socket
import sys
import six
from six.moves import range
import ovs.fatal_signal
import ovs.poller
import ovs.vlog
import six
from six.moves import range
if sys.platform == 'win32':
import ovs.winutils as winutils
import win32file

View File

@@ -17,12 +17,12 @@ import os
import socket
import sys
import six
import ovs.poller
import ovs.socket_util
import ovs.vlog
import six
try:
from OpenSSL import SSL
except ImportError:

View File

@@ -12,11 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import six
import sys
import ovs.util
import six
commands = {}
strtypes = six.string_types

View File

@@ -14,12 +14,11 @@
import os
import six
import ovs.jsonrpc
import ovs.stream
import ovs.util
import six
vlog = ovs.vlog.Vlog("unixctl_client")
strtypes = six.string_types

View File

@@ -17,9 +17,6 @@ import errno
import os
import sys
import six
from six.moves import range
import ovs.dirs
import ovs.jsonrpc
import ovs.stream
@@ -28,6 +25,9 @@ import ovs.util
import ovs.version
import ovs.vlog
import six
from six.moves import range
Message = ovs.jsonrpc.Message
vlog = ovs.vlog.Vlog("unixctl_server")
strtypes = six.string_types

View File

@@ -22,13 +22,13 @@ import socket
import sys
import threading
import six
from six.moves import range
import ovs.dirs
import ovs.unixctl
import ovs.util
import six
from six.moves import range
DESTINATIONS = {"console": "info", "file": "info", "syslog": "info"}
PATTERNS = {
"console": "%D{%Y-%m-%dT%H:%M:%SZ}|%05N|%c%T|%p|%m",

View File

@@ -12,19 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import six
import sys
import six
if sys.platform != 'win32':
raise Exception("Intended to use only on Windows")
else:
import pywintypes
import winerror
import win32pipe
import win32con
import win32security
import win32file
import win32event
import win32file
import win32pipe
import win32security
import winerror
def close_handle(handle, logger=None):

View File

@@ -18,18 +18,23 @@ rpcserver is an XML RPC server that allows RPC client to initiate tests
from __future__ import print_function
import exceptions
import sys
import exceptions
import six.moves.xmlrpc_client
from twisted.internet import reactor
from twisted.internet.error import CannotListenError
from twisted.web import xmlrpc
from twisted.web import server
import tcp
from twisted.internet import reactor
from twisted.internet.error import CannotListenError
from twisted.web import server
from twisted.web import xmlrpc
import udp
import util
import vswitch

View File

@@ -16,11 +16,13 @@
tcp module contains listener and sender classes for TCP protocol
"""
from twisted.internet.protocol import Factory, ClientFactory, Protocol
from twisted.internet import interfaces
from zope.interface import implements
import time
from twisted.internet import interfaces
from twisted.internet.protocol import ClientFactory, Factory, Protocol
from zope.interface import implements
class TcpListenerConnection(Protocol):
"""

View File

@@ -16,18 +16,20 @@
util module contains some helper function
"""
import array
import exceptions
import fcntl
import os
import re
import select
import signal
import socket
import struct
import signal
import subprocess
import re
from six.moves import range
import exceptions
import six.moves.xmlrpc_client
from six.moves import range
def str_ip(ip_address):

View File

@@ -11,6 +11,7 @@
# limitations under the License.
from __future__ import print_function
import sys
from distutils.command.build_ext import build_ext