diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9af419349..ead1b8c64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # See https://pre-commit.com for more information repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -16,27 +16,27 @@ repos: - id: trailing-whitespace - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 3.9.2 + rev: 7.1.1 hooks: - id: flake8 - repo: https://github.com/PyCQA/bandit - rev: 1.7.0 + rev: 1.7.10 hooks: - id: bandit args: ["--skip", "B101,B110,B311"] - repo: https://github.com/codespell-project/codespell - rev: v2.1.0 + rev: v2.3.0 hooks: - id: codespell diff --git a/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py b/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py index 1478a3b24..ffb9eb1cb 100644 --- a/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py +++ b/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py @@ -77,7 +77,7 @@ async def execute_callback(self, goal: Any) -> Any: # generate a unique ID goal_id = f"action_goal:{self.action_name}:{self.next_id()}" - def done_callback(fut: rclpy.task.Future()) -> None: + def done_callback(fut: rclpy.task.Future) -> None: if fut.cancelled(): goal.abort() self.protocol.log("info", f"Aborted goal {goal_id}") diff --git a/rosbridge_library/src/rosbridge_library/capabilities/advertise_service.py b/rosbridge_library/src/rosbridge_library/capabilities/advertise_service.py index 62a390836..2664c79a3 100644 --- a/rosbridge_library/src/rosbridge_library/capabilities/advertise_service.py +++ b/rosbridge_library/src/rosbridge_library/capabilities/advertise_service.py @@ -31,7 +31,7 @@ def next_id(self): async def handle_request(self, req, res): # generate a unique ID - request_id = f"service_request:{self.service_name }:{self.next_id()}" + request_id = f"service_request:{self.service_name}:{self.next_id()}" future = rclpy.task.Future() self.request_futures[request_id] = future diff --git a/rosbridge_library/src/rosbridge_library/capability.py b/rosbridge_library/src/rosbridge_library/capability.py index 785b17914..2ab6d4dc7 100644 --- a/rosbridge_library/src/rosbridge_library/capability.py +++ b/rosbridge_library/src/rosbridge_library/capability.py @@ -79,7 +79,7 @@ def basic_type_check(self, msg, types_info): """Performs basic typechecking on fields in msg. Keyword arguments: - msg -- a message, deserialized into a dictoinary + msg -- a message, deserialized into a dictionary types_info -- a list of tuples (mandatory, fieldname, fieldtype) where mandatory - boolean, is the field mandatory fieldname - the name of the field in the message diff --git a/rosbridge_library/src/rosbridge_library/protocol.py b/rosbridge_library/src/rosbridge_library/protocol.py index c3a2f418d..9d91076c9 100644 --- a/rosbridge_library/src/rosbridge_library/protocol.py +++ b/rosbridge_library/src/rosbridge_library/protocol.py @@ -311,7 +311,6 @@ def serialize(self, msg, cid=None): return None def deserialize(self, msg, cid=None): - """Turns the wire-level representation into a dictionary of values Default behaviour assumes JSON. Override to use a different container. diff --git a/rosbridge_library/test/experimental/complex_srv+tcp/test_non-ros_service_client_complex-srv.py b/rosbridge_library/test/experimental/complex_srv+tcp/test_non-ros_service_client_complex-srv.py index 673c3164a..eefc39f27 100755 --- a/rosbridge_library/test/experimental/complex_srv+tcp/test_non-ros_service_client_complex-srv.py +++ b/rosbridge_library/test/experimental/complex_srv+tcp/test_non-ros_service_client_complex-srv.py @@ -35,7 +35,7 @@ def request_service(): "position": {"y": 0.0, "x": 0.0, "z": 0.0}, "orientation": {"y": 0.0, "x": 0.0, "z": 0.0, "w": 0.0}, } - } + }, # "count" : request_byte_count # count is the parameter for send_bytes as defined in srv-file (always put into args field!) } service_request = json.dumps(service_request_object) diff --git a/rosbridge_library/test/internal/publishers/test_multi_publisher.py b/rosbridge_library/test/internal/publishers/test_multi_publisher.py index 01b1f8295..62e96cbcf 100755 --- a/rosbridge_library/test/internal/publishers/test_multi_publisher.py +++ b/rosbridge_library/test/internal/publishers/test_multi_publisher.py @@ -109,7 +109,7 @@ def test_publish(self): """Make sure that publishing works""" topic = "/test_publish" msg_type = "std_msgs/String" - msg = {"data": "why halo thar"} + msg = {"data": "why hello there"} received = {"msg": None} @@ -133,7 +133,7 @@ def test_publish_twice(self): """Make sure that publishing works""" topic = "/test_publish_twice" msg_type = "std_msgs/String" - msg = {"data": "why halo thar"} + msg = {"data": "why hello there"} received = {"msg": None} diff --git a/rosbridge_server/CHANGELOG.rst b/rosbridge_server/CHANGELOG.rst index fb0938382..c74a37fd9 100644 --- a/rosbridge_server/CHANGELOG.rst +++ b/rosbridge_server/CHANGELOG.rst @@ -486,7 +486,7 @@ Changelog for package rosbridge_server * merging changes of groovy-devel into hydro-devel * Specific IP address binding using roslauch * added parameter lookup to rosbridge_tcp.py, modules where those are used, and default parameters to launch file; internal default-values still get used when launch-file does not provide them; internal defaults can be changed within rosbridge_tcp.py -* increaing max_msg_length - still hardcoded +* increasing max_msg_length - still hardcoded * preparing pull request for upstream.. * cleanup: files, notes, some code * cleanup tcp-server