Skip to content

Commit 7cfeec8

Browse files
committed
run isort on all files
1 parent 7e36917 commit 7cfeec8

File tree

9 files changed

+39
-52
lines changed

9 files changed

+39
-52
lines changed

src/roslibpy/actionlib.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
import threading
2929
import time
3030

31-
from . import Message
32-
from . import Topic
31+
from . import Message, Topic
3332
from .event_emitter import EventEmitterMixin
3433

3534
__all__ = ["Goal", "GoalStatus", "ActionClient", "SimpleActionServer"]
@@ -109,7 +108,8 @@ def send(self, result_callback=None, timeout=None):
109108
110109
Args:
111110
timeout (:obj:`int`): Timeout for the goal's result expressed in seconds.
112-
callback (:obj:`callable`): Function to be called when a result is received. It is a shorthand for hooking on the ``result`` event.
111+
callback (:obj:`callable`): Function to be called when a result is received.
112+
It is a shorthand for hooking on the ``result`` event.
113113
"""
114114
if result_callback:
115115
self.on("result", result_callback)
@@ -220,7 +220,7 @@ def __init__(
220220

221221
if timeout:
222222
LOGGER.warn(
223-
"Deprecation warning: timeout parameter is ignored, and replaced by the DEFAULT_CONNECTION_TIMEOUT constant."
223+
"Deprecation warning: timeout parameter ignored and replaced by DEFAULT_CONNECTION_TIMEOUT constant."
224224
)
225225

226226
self.wait_status = threading.Event()
@@ -332,7 +332,8 @@ def start(self, action_callback):
332332
"""Start the action server.
333333
334334
Args:
335-
action_callback: Callable function to be invoked when a new goal is received. It takes one paramter containing the goal message.
335+
action_callback: Callable function to be invoked when a new goal is received.
336+
It takes one paramter containing the goal message.
336337
"""
337338
LOGGER.info("Action server {} started".format(self.server_name))
338339

src/roslibpy/comm/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
22

3-
from .comm import RosBridgeException
4-
from .comm import RosBridgeProtocol
3+
from .comm import RosBridgeException, RosBridgeProtocol
54

65
if sys.platform == "cli":
76
from .comm_cli import CliRosBridgeClientFactory as RosBridgeClientFactory

src/roslibpy/comm/comm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import json
44
import logging
55

6-
from roslibpy.core import Message
7-
from roslibpy.core import MessageEncoder
8-
from roslibpy.core import ServiceResponse
6+
from roslibpy.core import Message, MessageEncoder, ServiceResponse
97

108
LOGGER = logging.getLogger("roslibpy")
119

src/roslibpy/comm/comm_autobahn.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import logging
44
import threading
55

6-
from autobahn.twisted.websocket import WebSocketClientFactory
7-
from autobahn.twisted.websocket import WebSocketClientProtocol
8-
from autobahn.twisted.websocket import connectWS
6+
from autobahn.twisted.websocket import (
7+
WebSocketClientFactory,
8+
WebSocketClientProtocol,
9+
connectWS,
10+
)
911
from autobahn.websocket.util import create_url
10-
from twisted.internet import defer
11-
from twisted.internet import reactor
12-
from twisted.internet import threads
12+
from twisted.internet import defer, reactor, threads
1313
from twisted.internet.protocol import ReconnectingClientFactory
1414
from twisted.python import log
1515

src/roslibpy/comm/comm_cli.py

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,29 @@
33
import logging
44
import math
55

6-
from System import Action
7-
from System import Array
8-
from System import ArraySegment
9-
from System import Byte
10-
from System import TimeSpan
11-
from System import Uri
12-
from System import UriBuilder
13-
from System.Net.WebSockets import ClientWebSocket
14-
from System.Net.WebSockets import WebSocketCloseStatus
15-
from System.Net.WebSockets import WebSocketError
16-
from System.Net.WebSockets import WebSocketMessageType
17-
from System.Net.WebSockets import WebSocketReceiveResult
18-
from System.Net.WebSockets import WebSocketState
6+
from System import Action, Array, ArraySegment, Byte, TimeSpan, Uri, UriBuilder
7+
from System.Net.WebSockets import (
8+
ClientWebSocket,
9+
WebSocketCloseStatus,
10+
WebSocketError,
11+
WebSocketMessageType,
12+
WebSocketReceiveResult,
13+
WebSocketState,
14+
)
1915
from System.Text import Encoding
20-
from System.Threading import CancellationToken
21-
from System.Threading import CancellationTokenSource
22-
from System.Threading import ManualResetEventSlim
23-
from System.Threading import SemaphoreSlim
24-
from System.Threading import Thread
25-
from System.Threading import ThreadPool
26-
from System.Threading import WaitCallback
16+
from System.Threading import (
17+
CancellationToken,
18+
CancellationTokenSource,
19+
ManualResetEventSlim,
20+
SemaphoreSlim,
21+
Thread,
22+
ThreadPool,
23+
WaitCallback,
24+
)
2725
from System.Threading.Tasks import Task
2826

2927
from ..event_emitter import EventEmitterMixin
30-
from . import RosBridgeException
31-
from . import RosBridgeProtocol
28+
from . import RosBridgeException, RosBridgeProtocol
3229

3330
LOGGER = logging.getLogger('roslibpy')
3431
RECEIVE_CHUNK_SIZE = 1024

src/roslibpy/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Topic(object):
130130
queue_size (:obj:`int`): Queue size created at bridge side for re-publishing webtopics.
131131
latch (:obj:`bool`): True to latch the topic when publishing, False otherwise.
132132
queue_length (:obj:`int`): Queue length at bridge side used when subscribing.
133-
reconnect_on_close (:obj:`bool`): Reconnect the topic (both for publisher and subscribers) if a reconnection is detected.
133+
reconnect_on_close (:obj:`bool`): Reconnect topic (both publisher & subscriber) on reconnection.
134134
"""
135135

136136
SUPPORTED_COMPRESSION_TYPES = ("png", "none")

src/roslibpy/event_emitter.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@
3232
"""
3333

3434
try:
35-
from asyncio import ensure_future
36-
from asyncio import iscoroutine
35+
from asyncio import ensure_future, iscoroutine
3736
except ImportError:
3837
iscoroutine = None
3938
ensure_future = None
4039

41-
from collections import OrderedDict
42-
from collections import defaultdict
40+
from collections import OrderedDict, defaultdict
4341
from threading import RLock
4442

4543
__all__ = ["EventEmitterMixin", "EventEmitterException"]

src/roslibpy/ros.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
import logging
44
import threading
55

6-
from . import Message
7-
from . import Param
8-
from . import Service
9-
from . import ServiceRequest
10-
from . import Time
6+
from . import Message, Param, Service, ServiceRequest, Time
117
from .comm import RosBridgeClientFactory
128

139
__all__ = ["Ros", "set_rosapi_timeout"]

src/roslibpy/tf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
import logging
1919
import math
2020

21-
from . import Service
22-
from . import ServiceRequest
23-
from . import Topic
21+
from . import Service, ServiceRequest, Topic
2422

2523
__all__ = ["TFClient"]
2624

@@ -36,7 +34,7 @@ class TFClient(object):
3634
angular_threshold (:obj:`float`): Angular threshold for the TF republisher.
3735
translation_threshold (:obj:`float`): Translation threshold for the TF republisher.
3836
rate (:obj:`float`): Rate for the TF republisher.
39-
update_delay (:obj:`int`): Time expressed in milliseconds to wait after a new subscription to update the TF republisher's list of TFs.
37+
update_delay (:obj:`int`): Time expressed in milliseconds to wait after a new subscription before update TFs.
4038
topic_timeout (:obj:`int`): Timeout parameter for the TF republisher expressed in milliseconds.
4139
repub_service_name (:obj:`str`): Name of the republish tfs service, e.g. ``/republish_tfs``.
4240
"""

0 commit comments

Comments
 (0)