diff options
author | Allan Lewis <allanlewis@users.noreply.github.com> | 2016-04-27 15:00:56 +0100 |
---|---|---|
committer | Allan Lewis <allanlewis@users.noreply.github.com> | 2016-04-27 15:00:56 +0100 |
commit | 525fcfc0fb8099eae1ad92b44e14f5ca9b27780e (patch) | |
tree | ff8b8044c2d5d445f48b41c3f1708c1b63dff5b9 /websocket/_socket.py | |
parent | 9f138c94e71458172cd90dec49ce1d1163895c4f (diff) | |
download | websocket-client-525fcfc0fb8099eae1ad92b44e14f5ca9b27780e.tar.gz |
wsdump, test_fuzzingclient, websocket.*, test_websocket: Organise imports
Previously, because of the multiple instances of `from foo import *`, names were
imported from modules that had themselves imported them, instead of from the
place of definition. This commit therefore does the following:
- Declares `__all__` in every module that imports anything, so that
`from foo import *` is sane.
- Sorts the imports based on conventions, similar to the output of `isort`.
- Places all conditional imports after unconditional imports, except where that
isn't valid.
- Imports local names from the modules where they are defined, except when
importing the package itself.
Diffstat (limited to 'websocket/_socket.py')
-rw-r--r-- | websocket/_socket.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/websocket/_socket.py b/websocket/_socket.py index f2bc4f1..e2e1dd2 100644 --- a/websocket/_socket.py +++ b/websocket/_socket.py @@ -19,13 +19,13 @@ Copyright (C) 2010 Hiroki Ohtani(liris) Boston, MA 02110-1335 USA """ - import socket + import six from ._exceptions import * -from ._utils import * from ._ssl_compat import * +from ._utils import * DEFAULT_SOCKET_OPTION = [(socket.SOL_TCP, socket.TCP_NODELAY, 1)] if hasattr(socket, "SO_KEEPALIVE"): |