-
Notifications
You must be signed in to change notification settings - Fork 24
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
[SW-164] Add ruff and black formatting to spot_wrapper #84
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
TODO this is still failing black tests on the runner for wrapper_helpers.py |
Is there a need to use a line length of 120 characters rather than the default of 88? Details at https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length. |
The 120 character line length is also used in |
@khughes-bdai internally we follow googles style guide mostly. I think we should go with the default/previously enforced limit in the public facing |
I thought it might be related to internal BDAI policy, and I have no objection if you want to use 120 length to conform to that. I was previously using black on this repository and on spot_ros with default settings. The code itself didn't follow any style guide, although function comments do use the google style. |
@heuristicus Introducing these precommits will implicitly enforce the Google style. If you are ok with that, I will ask @khughes-bdai to add a link to the style guide on the README |
Sure, sounds good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a link to the Google style guide and a quick blurb about it being the default style?
Change Overview
This PR enforces
ruff
andblack
linting for all files inspot_wrapper
. Pre-commit hooks have been added, and all existing code that did not meet these style requirements has been modified to do so. The configuration files added were taken from thespot_ros2
repository.Testing Done
I tested a few general Spot examples (move the arm, walk forward) that rely on
spot_wrapper
and the functionality was unchanged.