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

Install flake8 and flake8-import-order #3

Merged
merged 4 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
2 changes: 1 addition & 1 deletion linux_docker_resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN if test ${PLATFORM} = x86; then curl --silent https://packagecloud.io/gpg.ke
RUN apt-get update && apt-get install -y build-essential ccache cmake pkg-config python3-empy python3-setuptools python3-vcstool

# Install build and test dependencies of ROS 2 packages.
RUN apt-get update && apt-get install -y clang-format-3.8 cppcheck git pydocstyle pyflakes python3-coverage python3-mock python3-nose python3-pep8 uncrustify
RUN apt-get update && apt-get install -y clang-format-3.8 cppcheck git pydocstyle pyflakes python3-coverage python3-flake8 python3-mock python3-nose python3-pep8 uncrustify

# Install and self update pip/setuptools to the latest version.
RUN apt-get update && apt-get install -y python3-pip
Expand Down
11 changes: 7 additions & 4 deletions ros2_batch_job/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@
sys.stderr = UnbufferedIO(sys.stderr)

pip_dependencies = [
'EmPy',
Copy link
Member

Choose a reason for hiding this comment

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

should dependencies be listed in alphabetical order regardless of the case? (it seems that's how flake8 import order interprets alphabetical order according to the fixes in the attached PRs e.g. https://github.com/ros2/rosidl_dds/pull/40/files)

Copy link
Member Author

Choose a reason for hiding this comment

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

yep you're right that that's how the 'google-style' for flake8-import-order does it. I think it might be more common to sort considering case, so I'll leave it like this unless there are objections

'coverage',
'flake8',
'flake8-import-order',
'mock',
'nose',
'pep8',
'pydocstyle',
'pyflakes',
'flake8',
'mock',
'coverage',
'EmPy',
'vcstool',
]

Expand Down Expand Up @@ -382,6 +383,8 @@ def run(args, build_function, blacklisted_package_names=None):
job.run(['"%s"' % job.python, '-m', 'pip', '--version'], shell=True)
# Install pip dependencies
job.run(['"%s"' % job.python, '-m', 'pip', 'install', '-U'] + pip_dependencies, shell=True)
# Show what pip has
job.run(['"%s"' % job.python, '-m', 'pip', 'freeze'], shell=True)
print('# END SUBSECTION')

# Skip git operations on arm because git doesn't work in qemu. Assume
Expand Down