frankaemika / franka_ros

ROS integration for Franka research robots
https://frankaemika.github.io
Apache License 2.0
339 stars 307 forks source link

refactor: improve python code formatting #359

Closed rickstaa closed 10 months ago

rickstaa commented 10 months ago

This pull request improves the Python code following the black format.

andrejpan commented 10 months ago

Thanks for the effort, however this project should first accept (automated) Python format rules (and so far has none). Besides this PR, nobody else knows that formatting should be according to black.

Maybe open another PR where you integrate automated Python formatting and lining rules.

rickstaa commented 10 months ago

@andrejpan, thanks for the fast response. I just checked your CI, and it looks like you already use a CI step to check Python formatting with pycodestyle. As pycodestyle is close but not fully equal to black I think we can close this PR.

https://github.com/frankaemika/franka_ros/blob/d439fc7d66a3edb890eefb0fa955f6d7042cac12/.github/workflows/ci.yml#L78-L87

We could, in the future, use a pre-commit hook, with pre-commit, to automatically format the python code according to pycodestyle (see https://www.pydocstyle.org/en/4.0.0/usage.html#usage-with-the-pre-commit-git-hooks-framework).