# Recommended way to format python code?

**URL:** <https://discourse.openrobotics.org/t/recommended-way-to-format-python-code/34823>\
**Category:** ROS General\
**Tags:** release, ros2, python, black\
**Created:** [November 24, 2023, 10:03pm UTC](https://discourse.openrobotics.org/t/recommended-way-to-format-python-code/34823 "2023-11-24T22:03:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![RFRIEDM](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rfriedm/32/10410_2.png) [@RFRIEDM](https://discourse.openrobotics.org/u/RFRIEDM)\
**Post date:** [November 28, 2023, 7:13pm UTC](https://discourse.openrobotics.org/t/recommended-way-to-format-python-code/34823/4 "2023-11-28T19:13:34Z")

</div>

I’m using ament\_black in pre-commit. It works great.

Here’s the PR to add support.  
[https://github.com/ArduPilot/ardupilot/pull/25597](https://github.com/ArduPilot/ardupilot/pull/25597)

---

_[View the full topic](https://discourse.openrobotics.org/t/recommended-way-to-format-python-code/34823)._
