Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[backport humble] Fix compatibility with flake8 version 5 (ament#410)
This is a backport of ament#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 via `pip` and so is installed at the newer version 5. `ament_lint` then fails to run with: ``` /opt/ros/humble/install/lib/python3.8/site-packages/ament_flake8/main.py:150: in get_flake8_style_guide config_finder = config.ConfigFileFinder( E AttributeError: module 'flake8.options.config' has no attribute 'ConfigFileFinder' ``` This PR fixes that issue. * Fix compatibility with flake8 version 5 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. Signed-off-by: Timo Röhling <roehling@debian.org> Co-authored-by: Chris Lalancette <clalancette@gmail.com> Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
- Loading branch information