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 #167

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
5 changes: 3 additions & 2 deletions rclpy/services/minimal_client/client.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):
rclpy.init(args)
Expand All @@ -43,5 +43,6 @@ def main(args=None):
'Result of add_two_ints: for %d + %d = %d' %
(req.a, req.b, cli.response.sum))


if __name__ == '__main__':
main()
5 changes: 3 additions & 2 deletions rclpy/services/minimal_client/client_async.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):
rclpy.init(args)
Expand Down Expand Up @@ -47,5 +47,6 @@ def main(args=None):

rclpy.shutdown()


if __name__ == '__main__':
main()
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


class MinimalClientAsync:
def __init__(self, node):
Expand Down Expand Up @@ -55,5 +55,6 @@ def main(args=None):

rclpy.shutdown()


if __name__ == '__main__':
main()
5 changes: 2 additions & 3 deletions rclpy/services/minimal_client/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
<maintainer email="mikael@osrfoundation.org">Mikael Arguedas</maintainer>
<license>Apache License 2.0</license>

<exec_depend>rclpy</exec_depend>
<exec_depend>example_interfaces</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>std_msgs</exec_depend>

<!-- These test dependencies are optional
Their purpose is to make sure that the code passes the linters -->
<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
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=['.'])
rc = main(argv=[])
assert rc == 0, 'Found errors'
20 changes: 0 additions & 20 deletions rclpy/services/minimal_client/test/test_pep8.py

This file was deleted.

5 changes: 2 additions & 3 deletions rclpy/services/minimal_service/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
<maintainer email="mikael@osrfoundation.org">Mikael Arguedas</maintainer>
<license>Apache License 2.0</license>

<exec_depend>rclpy</exec_depend>
<exec_depend>example_interfaces</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>std_msgs</exec_depend>

<!-- These test dependencies are optional
Their purpose is to make sure that the code passes the linters -->
<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/services/minimal_service/service.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,6 @@ def main(args=None):
node.destroy_service(srv)
rclpy.shutdown()


if __name__ == '__main__':
main()
5 changes: 3 additions & 2 deletions rclpy/services/minimal_service/service_member_function.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


class MinimalService:
def __init__(self, node):
Expand All @@ -40,5 +40,6 @@ def main(args=None):

rclpy.shutdown()


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=['.'])
rc = main(argv=[])
assert rc == 0, 'Found errors'
20 changes: 0 additions & 20 deletions rclpy/services/minimal_service/test/test_pep8.py

This file was deleted.

3 changes: 1 addition & 2 deletions rclpy/topics/minimal_publisher/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
<!-- These test dependencies are optional
Their purpose is to make sure that the code passes the linters -->
<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
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ def timer_callback():
node.destroy_node()
rclpy.shutdown()


if __name__ == '__main__':
main()
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ def main(args=None):
node.destroy_node()
rclpy.shutdown()


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions rclpy/topics/minimal_publisher/publisher_old_school.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ def main(args=None):
node.destroy_node()
rclpy.shutdown()


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=['.'])
rc = main(argv=[])
assert rc == 0, 'Found errors'
20 changes: 0 additions & 20 deletions rclpy/topics/minimal_publisher/test/test_pep8.py

This file was deleted.

3 changes: 1 addition & 2 deletions rclpy/topics/minimal_subscriber/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
<!-- These test dependencies are optional
Their purpose is to make sure that the code passes the linters -->
<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
1 change: 1 addition & 0 deletions rclpy/topics/minimal_subscriber/subscriber_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ def main(args=None):
node.destroy_node()
rclpy.shutdown()


if __name__ == '__main__':
main()
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ def main(args=None):
node.destroy_node()
rclpy.shutdown()


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions rclpy/topics/minimal_subscriber/subscriber_old_school.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ def main(args=None):
node.destroy_node()
rclpy.shutdown()


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=['.'])
rc = main(argv=[])
assert rc == 0, 'Found errors'
20 changes: 0 additions & 20 deletions rclpy/topics/minimal_subscriber/test/test_pep8.py

This file was deleted.