colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
107 stars 46 forks source link

Several lines from _local_setup_util_sh.py contain this: E501 line too long #643

Closed sloretz closed 6 months ago

sloretz commented 6 months ago

Transfered from: https://github.com/ament/ament_package/issues/146 (@ionutnechita-intel FYI)


OS: ROS2 rolling - 02 April 2024 Ubuntu 24.04 Alpha LTS

This line have issue with flake8 and pycodestyle:

cat  _local_setup_util_sh.py
...
FORMAT_STR_INVOKE_SCRIPT = 'COLCON_CURRENT_PREFIX="{prefix}" _colcon_prefix_sh_source_script "{script_path}"'  # noqa: E501
FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi'  # noqa: E501
FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi'  # noqa: E501

I append noqa: E501 to bypass this errors.