Closed emersonknapp closed 1 year ago
Rebased and re-pushed, branch produced by
git cherry-pick 66c76cc # 387
git cherry-pick 6adf864 # 410
git rebase --signoff origin/humble
Pulls: ament/ament_lint#451 Gist: https://gist.githubusercontent.com/emersonknapp/004f93b823abd35d251b4153e4cb8022/raw/891034bcc1a07396dbd14a76ccbbfd1f0e56058e/ros2.repos BUILD args: TEST args: ROS Distro: rolling Job: ci_launcher ci_launcher ran: https://ci.ros2.org/job/ci_launcher/12671
@clalancette merge please!
This is a combined backport of #387 and #410 to Humble.
When building on Ubuntu 20.04 Focal (Tier 3 support) and following the instructions in https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#install-development-tools-and-ros-tools for that platform,
flake8
is installed viapip
and so is installed at the newer version 5.ament_lint
then fails to run with:387 original text
This PR fixes https://github.com/ament/ament_lint/issues/382 by explicitly adding any exclude args in the flake8 config file (normally configuration/ament_flake8.ini) to the exclude arglist.
Notably, this uses the same parsing logic that the version of flake8 ROS is using on focal and jammy (3.9.7 and 4.0.0). I tried to account for differences in the parsing logic between 3.9.7 and 4.0.0 with a try except clause.
410 original text
The ConfigFileFinder class no longer exists in flake8 version 5. The get_style_guide() code has been updated from the latest api.legacy.get_style_guide() in flake8.