Skip to content

Commit

Permalink
Add additional dependencies to ament_flake8. (#454)
Browse files Browse the repository at this point in the history
The ROS 2 style guides and CI depend on all of the
following flake8 plugins:

python3-flake8-blind-except
python3-flake8-builtins
python3-flake8-class-newline
python3-flake8-comprehensions
python3-flake8-deprecated
python3-flake8-docstrings
python3-flake8-import-order
python3-flake8-quotes

However, we have classically not directly depended on these
anywhere.  Due to the plugin nature of flake8, this means
that the tests are just skipped if a user runs the tests
without them installed.  In turn, that means the errors only show
up when we run CI against their code, leading to user frustration.

To alleviate that, directly depend on the flake8 plugins that
we expect to exist.  This will ensure that they are automatically
installed when users do an installation.  The tradeoff is that
we'll increase the installation size for everyone by about 1MB, since
ament_flake8 is one of the core packages.

One other note is that 3 of the plugins are (still) disabled because
we have no packages on RHEL-9; that is being worked on and we'll enable
those once those packages are available.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Oct 3, 2023
1 parent 299159e commit 25e61b4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ament_flake8/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@

<exec_depend>ament_lint</exec_depend>
<exec_depend>python3-flake8</exec_depend>
<!-- TODO(clalancette): enable this once it is available in RHEL-9 -->
<!-- <exec_depend>python3-flake8-blind-except</exec_depend> -->
<exec_depend>python3-flake8-builtins</exec_depend>
<!-- TODO(clalancette): enable this once it is available in RHEL-9 -->
<!-- <exec_depend>python3-flake8-class-newline</exec_depend> -->
<exec_depend>python3-flake8-comprehensions</exec_depend>
<!-- TODO(clalancette): enable this once it is available in RHEL-9 -->
<!-- <exec_depend>python3-flake8-deprecated</exec_depend> -->
<exec_depend>python3-flake8-docstrings</exec_depend>
<exec_depend>python3-flake8-import-order</exec_depend>
<exec_depend>python3-flake8-quotes</exec_depend>

<export>
<build_type>ament_python</build_type>
Expand Down

0 comments on commit 25e61b4

Please sign in to comment.