Skip to content

Switch Python lint tooling from isort/autopep8 to black - #23

Merged
destogl merged 2 commits into
ros-controls:masterfrom
b-robotized-forks:chore/black-formatting
Aug 16, 2026
Merged

Switch Python lint tooling from isort/autopep8 to black#23
destogl merged 2 commits into
ros-controls:masterfrom
b-robotized-forks:chore/black-formatting

Conversation

@destogl

@destogl destogl commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace isort (--profile google, force-single-line) and autopep8 with black and pyupgrade, matching the pre-commit stack used in ros_team_workspace and ros2_control.
  • Same-module imports are now grouped onto one from module import a, b, c line instead of one line per name, wrapped by black when they exceed the line length.
  • Fixed the flake8/pydocstyle findings the new tooling surfaces: several unused imports, an f-string with no placeholders in autostart_adapter.py, and one docstring summary line in parser.py.

Testing

pre-commit run --all-files
colcon build --packages-select foreman foreman_msgs
colcon test --packages-select foreman

Result: all pre-commit hooks pass; 49 tests, 0 failures.

destogl and others added 2 commits August 16, 2026 13:47
…ingle-line imports

Replace isort (--profile google) and autopep8 with black and pyupgrade,
matching the pre-commit stack used in ros_team_workspace and ros2_control.
Group same-module imports onto one line instead of one per line, and fix
the flake8/pydocstyle findings the new tooling surfaces (unused imports,
an f-string with no placeholders, one docstring summary line).

Co-Authored-By: Norbert <norbert@agents.b-robotized.com>
Match ros2_control's full pre-commit-hooks set: check-added-large-files,
check-ast, check-case-conflict, check-docstring-first,
check-merge-conflict, check-symlinks, check-xml, debug-statements,
mixed-line-ending, fix-byte-order-marker, and --allow-multiple-documents
on check-yaml.

Co-Authored-By: Norbert <norbert@agents.b-robotized.com>
@destogl
destogl merged commit e737a0a into ros-controls:master Aug 16, 2026
5 checks passed
@destogl
destogl deleted the chore/black-formatting branch August 16, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant