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

comply with flake8 import order #16

Merged
merged 3 commits into from
Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rclpy_tutorials/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
<exec_depend>std_msgs</exec_depend>

<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_pep8</test_depend>
<test_depend>ament_pyflakes</test_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
5 changes: 3 additions & 2 deletions rclpy_tutorials/services/add_two_ints_client_async_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import time

import rclpy

from example_interfaces.srv import AddTwoInts

import rclpy


def main(args=None):

Expand All @@ -44,5 +44,6 @@ def main(args=None):
cli.call(req)
rclpy.spin_once(node)


if __name__ == '__main__':
main()
5 changes: 3 additions & 2 deletions rclpy_tutorials/services/add_two_ints_client_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import rclpy

from example_interfaces.srv import AddTwoInts

import rclpy


def main(args=None):
rclpy.init(args)
Expand All @@ -34,5 +34,6 @@ def main(args=None):
print('Result of add_two_ints: %d' % cli.response.sum)
i += 1


if __name__ == '__main__':
main()
6 changes: 4 additions & 2 deletions rclpy_tutorials/services/add_two_ints_server_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import rclpy

from example_interfaces.srv import AddTwoInts

import rclpy


def add_two_ints_callback(request, response):
response.sum = request.a + request.b
Expand All @@ -39,5 +39,7 @@ def main(args=None):
# (optional - otherwise it will be done automatically
# when the garbage collector destroys the node object)
node.destroy_service(srv)


if __name__ == '__main__':
main()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2015 Open Source Robotics Foundation, Inc.
# Copyright 2017 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ament_pyflakes.main import main
from ament_flake8.main import main


def test_pyflakes():
rc = main(argv=['.', 'test'])
rc = main(argv=[])
assert rc == 0, 'Found errors'
20 changes: 0 additions & 20 deletions rclpy_tutorials/test/test_pep8.py

This file was deleted.

1 change: 1 addition & 0 deletions rclpy_tutorials/topics/listener_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ def main(args=None):
while rclpy.ok():
rclpy.spin_once(node)


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions rclpy_tutorials/topics/listener_qos_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ def main(argv=sys.argv[1:]):
rclpy.spin_once(node)
cycle_count += 1


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions rclpy_tutorials/topics/talker_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ def main(args=None):
# TODO(wjwwood): need to spin_some or spin_once with timeout
sleep(1)


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions rclpy_tutorials/topics/talker_qos_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ def main(argv=sys.argv[1:]):
cycle_count += 1
sleep(1)


if __name__ == '__main__':
main()