Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit and fix issues (backport #954) #961

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rosbridge_library/src/rosbridge_library/capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion rosbridge_library/src/rosbridge_library/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand All @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion rosbridge_server/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading