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

flake8 line length linting error regression #912

Closed
tfoote opened this issue Feb 14, 2023 · 0 comments · Fixed by #913
Closed

flake8 line length linting error regression #912

tfoote opened this issue Feb 14, 2023 · 0 comments · Fixed by #913
Labels

Comments

@tfoote
Copy link
Member

tfoote commented Feb 14, 2023

I just submited a PR #911 with a small change, and I'm getting tons of linting errors on Macos-latest python 3.10 due to line length.

It appears that the default has changed or the parameters to flake8 have changed so much of the code base is failing at 80 char width.

https://github.com/ros-infrastructure/rosdep/actions/runs/4178200482/jobs/7236711419

>       assert not report.total_errors, \
            'flake8 reported {report.total_errors} errors'.format(**locals())
E       AssertionError: flake8 reported 714 errors
E       assert not 714
E        +  where 714 = <flake8.api.legacy.Report object at 0x1128bdf00>.total_errors

test/test_flake8.py:62: AssertionError
----------------------------- Captured stdout call -----------------------------

714   E501 line too long (86 > 79 characters)
----------------------------- Captured stderr call -----------------------------
/Users/runner/work/rosdep/rosdep/doc/rosdep_doc_utils.py:35:80: E501 line too long (86 > 79 characters)
                [py, '-c', "from rosdep2.main import rosdep_main;rosdep_main(['-h'])"]
                                                                               ^
/Users/runner/work/rosdep/rosdep/doc/rosdep_doc_utils.py:38:80: E501 line too long (93 > 79 characters)
                nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out.decode()))
                                                                               ^
/Users/runner/work/rosdep/rosdep/doc/rosdep_doc_utils.py:42:80: E501 line too long (97 > 79 characters)
                [py, '-c', "from rosdep2.main import rosdep_main;rosdep_main(['install', '-h'])"]
                                                                               ^
/Users/runner/work/rosdep/rosdep/doc/rosdep_doc_utils.py:45:80: E501 line too long (93 > 79 characters)
                nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out.decode()))
                                                                               ^
/Users/runner/work/rosdep/rosdep/setup.py:53:80: E501 line too long (98 > 79 characters)
    kwargs['install_requires'] += ['catkin_pkg >= 0.4.0', 'rospkg >= 1.4.0', 'rosdistro >= 0.7.5']
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/__init__.py:49:80: E501 line too long (84 > 79 characters)
# don't let import error take down code as when attempting to compute version number
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/__init__.py:75:80: E501 line too long (120 > 79 characters)
    platform_mods = [alpine, arch, cygwin, debian, gentoo, nix, openembedded, opensuse, osx, redhat, slackware, freebsd]
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/__init__.py:97:80: E501 line too long (85 > 79 characters)
gbpdistro_support.create_default_installer_context = create_default_installer_context
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/ament_packages/resources.py:34:80: E501 line too long (83 > 79 characters)
        resource_path = os.path.join(path, RESOURCE_INDEX_SUBFOLDER, resource_type)
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/ament_packages/search_paths.py:30:80: E501 line too long (94 > 79 characters)
            "Environment variable '{}' is not set or empty".format(AMENT_PREFIX_PATH_ENV_VAR))
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/cache_tools.py:66:80: E501 line too long (85 > 79 characters)
        write_atomic(filepath + PICKLE_CACHE_EXT, pickle.dumps(rosdep_data, 2), True)
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/cache_tools.py:78:80: E501 line too long (115 > 79 characters)
    fd, filepath_tmp = tempfile.mkstemp(prefix=os.path.basename(filepath) + '.tmp.', dir=os.path.dirname(filepath))
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/catkin_packages.py:16:80: E501 line too long (106 > 79 characters)
VALID_DEPENDENCY_TYPES = {'build', 'buildtool', 'build_export', 'buildtool_export', 'exec', 'test', 'doc'}
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/catkin_support.py:34:80: E501 line too long (84 > 79 characters)
from .sources_list import get_sources_list_dir, DataSourceMatcher, SourcesListLoader
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/catkin_support.py:[91](https://github.com/ros-infrastructure/rosdep/actions/runs/4178200482/jobs/7236711419#step:5:92):80: E501 line too long (102 > 79 characters)
    inst_key, rule = d.get_rule_for_platform(os_name, os_version, os_installers, default_os_installer)
                                                                               ^
/Users/runner/work/rosdep/rosdep/src/rosdep2/catkin_support.py:[106](https://github.com/ros-infrastructure/rosdep/actions/runs/4178200482/jobs/7236711419#step:5:107):80: E501 line too long (81 > 79 characters)
        raise ValidationFailed("""rosdep database is not initialized, please run:
\tsudo rosdep init
""")
@tfoote tfoote added the bug label Feb 14, 2023
@tfoote tfoote changed the title flake8 line length linting errors flake8 line length linting error regression Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant