Skip to content

Commit

Permalink
isort and tox file
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdeljelil committed Aug 6, 2016
1 parent e03349a commit dfb0962
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion examples/server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import asyncio
from websocket_redis.server.ws_server import WSServer

from websocket_redis.server.ws_handler import WSHandler
from websocket_redis.server.ws_server import WSServer


class MyWSHandler(WSHandler):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import websockets

from websocket_redis.api.async import APIClientListener as BaseAsyncAPIListener
from websocket_redis.api.threading import APIClientListener as BaseThreadAPIListener
from websocket_redis.api.threading import \
APIClientListener as BaseThreadAPIListener
from websocket_redis.common import asyncio_ensure_future
from websocket_redis.server import WSHandler, WSServer

Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ deps = flake8

[testenv:isort]
commands = isort --check-only --recursive websocket_redis
# commands = isort --recursive --diff websocket_redis
deps = isort
2 changes: 2 additions & 0 deletions websocket_redis/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from websocket_redis.api.abstract_message import AbstractMessage
from websocket_redis.api.abstract_listener import AbstractListener

__all__ = ["AbstractMessage", "AbstractListener"]
2 changes: 2 additions & 0 deletions websocket_redis/api/async/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from websocket_redis.api.async.listener import APIClientListener

__all__ = ["APIClientListener"]
1 change: 0 additions & 1 deletion websocket_redis/api/async/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging

import aioredis

from websocket_redis.api import AbstractListener
from websocket_redis.api.async.message import Message
from websocket_redis.common.aioredis import RedisManagerAIO
Expand Down
2 changes: 2 additions & 0 deletions websocket_redis/api/threading/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from websocket_redis.api.threading.listener import APIClientListener

__all__ = ["APIClientListener"]
2 changes: 2 additions & 0 deletions websocket_redis/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from websocket_redis.common.compatibility import asyncio_ensure_future

__all__ = ['asyncio_ensure_future']
2 changes: 2 additions & 0 deletions websocket_redis/common/aioredis/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from websocket_redis.common.aioredis.aioredis_manager import RedisManagerAIO

__all__ = ["RedisManagerAIO"]
2 changes: 2 additions & 0 deletions websocket_redis/server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from websocket_redis.server.ws_server import WSServer
from websocket_redis.server.ws_handler import WSHandler

__all__ = ['WSServer', 'WSHandler']
2 changes: 1 addition & 1 deletion websocket_redis/server/ws_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def on_message(self, text):
Args:
text : str, message has been sent
form the client to web-socket server
this method is coroutine
this method is coroutine
"""
pass

Expand Down
3 changes: 1 addition & 2 deletions websocket_redis/server/ws_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
import logging

import websockets
from websockets.exceptions import ConnectionClosed

from websocket_redis.common import asyncio_ensure_future
from websocket_redis.common.aioredis import RedisManagerAIO
from websocket_redis.server.ws_handler import WSHandler
from websockets.exceptions import ConnectionClosed

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit dfb0962

Please sign in to comment.