Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pyflakes complaining of imported but unused module. #102

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

ernestmc
Copy link
Member

@ernestmc ernestmc commented Mar 3, 2016

Fixes the following error:

-- run_test.py: invoking following command in '/home/rosbuild/ci_scripts/ws/src/ros2/rosidl/rosidl_generator_py':
 - /home/rosbuild/ci_scripts/ws/install/ament_pyflakes/bin/ament_pyflakes --xunit-file /home/rosbuild/ci_scripts/ws/build/rosidl_generator_py/test_results/rosidl_generator_py/pyflakes.xunit.xml
rosidl_generator_py/__init__.py:23: 'generate_py' imported but unused
1 errors
rosidl_generator_py/__init__.py

rosidl_generator_py/generate_py_impl.py

rosidl_generator_py/import_type_support_impl.py

test/test_interfaces.py

-- run_test.py: return code 1
-- run_test.py: verify result file '/home/rosbuild/ci_scripts/ws/build/rosidl_generator_py/test_results/rosidl_generator_py/pyflakes.xunit.xml'

@ernestmc ernestmc added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 3, 2016
@@ -21,6 +21,7 @@

try:
from .generate_py_impl import generate_py
assert generate_py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this @ernestmc. I believe you can add # noqa to the end of line 23, rather than adding an assert. I think that would be a better way to work around the warning.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjwwood I believe this only works with flake8

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's another good reason to just use flake8... Oh well. Thanks for looking into it @ernestmc.

@jacquelinekay
Copy link
Contributor

Launching CI: http://ci.ros2.org/job/ci_linux/1052/

@jacquelinekay
Copy link
Contributor

+1

1 similar comment
@wjwwood
Copy link
Member

wjwwood commented Mar 3, 2016

+1

wjwwood added a commit that referenced this pull request Mar 3, 2016
Fix pyflakes complaining of imported but unused module.
@wjwwood wjwwood merged commit f8b3c03 into master Mar 3, 2016
@wjwwood wjwwood deleted the fix_test_pyflake_import branch March 3, 2016 19:39
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Mar 3, 2016
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.

3 participants