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

Update flake8 per-file ignores #25108

Merged
merged 1 commit into from Jan 30, 2023
Merged

Conversation

dstansby
Copy link
Member

PR Summary

Update this to:

  • Re-arrange some of the files into alphabetical order
  • Remove some error ignores that we don't need any more

For reference I managed to 95% automate this by parsing the outptut of flake8 into a list of ingore rules:

from collections import defaultdict

with open('flake8.txt') as f:
    lines = f.readlines()

lines = [l.split(': ') for l in lines]
files = [l[0].split(':')[0] for l in lines]
codes = [l[1].split(' ')[0] for l in lines]

errs = defaultdict(set)
for f, c in zip(files, codes):
    errs[f].add(c)

errs = {k: list(v) for k, v in errs.items()}
for f in sorted(errs):

    err_str = ', '.join(sorted(errs[f]))
    print(f"{f}: {err_str}")

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@dstansby dstansby added this to the v3.8.0 milestone Jan 30, 2023
@timhoffm timhoffm merged commit a30c0b1 into matplotlib:main Jan 30, 2023
@dstansby dstansby deleted the update-flake8 branch January 30, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants