ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
172 stars 161 forks source link

Fix linters for `helpers.py` and `ros2node/api/__init__.py` #808

Closed Crola1702 closed 1 year ago

Crola1702 commented 1 year ago

Linux debug CI shows test regressions with test_flake8:

Reference build: Linux Debug #2589

ros2cli.ros2cli.test.test_flake8.test_flake8

``` test/test_flake8.py:23: in test_flake8 assert rc == 0, \ E AssertionError: Found 1 code style errors / warnings: E ./ros2cli/helpers.py:46:1: E302 expected 2 blank lines, found 1 E assert 1 == 0 ```

ros2node.ros2node.test.test_flake8.test_flake8

``` test/test_flake8.py:23: in test_flake8 assert rc == 0, \ E AssertionError: Found 2 code style errors / warnings: E ./ros2node/api/__init__.py:15:1: F401 'time' imported but unused E ./ros2node/api/__init__.py:17:1: I100 Import statements are in the wrong order. 'from collections import namedtuple' should be before 'import time' E assert 1 == 0 ```
mjcarroll commented 1 year ago

Duplicate of #807 (or vice-versa, they were opened at the same time!)

clalancette commented 1 year ago

CI:

clalancette commented 1 year ago

The failing tests on Linux are a separate problem. This looks like it fixes the flake8 issues, so going ahead and merging it. Thanks @Crola1702 !