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

Bump flake8 version in pre-commit-config.yaml #36412

Merged
merged 1 commit into from
Sep 17, 2020
Merged

Bump flake8 version in pre-commit-config.yaml #36412

merged 1 commit into from
Sep 17, 2020

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented Sep 17, 2020

The flake8 version used in pre-commit-config.yaml seems to emit spurious errors when there are mypy comments for ignoring specific kinds of type errors. Bumping to the latest version of flake8 seems to fix this.

flake8...................................................................Failed
- hook id: flake8
- exit code: 1

pandas/core/generic.py:701:36: F821 undefined name 'ignore'
pandas/core/generic.py:701:36: F821 undefined name 'arg'
pandas/core/generic.py:4220:39: F723 syntax error in type comment 'ignore[return-value, arg-type]'
pandas/core/generic.py:4283:39: F723 syntax error in type comment 'ignore[return-value, arg-type]'

For reference this is line 701 that it's complaining about:

            new_values, *new_axes  # type: ignore[arg-type]

ref PyCQA/pyflakes#455

@jorisvandenbossche jorisvandenbossche added the Code Style Code style, linting, code_checks label Sep 17, 2020
@jorisvandenbossche
Copy link
Member

So we are actually pinning flake8 to an older version (#34150) for the code checks. But it seems that most issues have been resolved (eg #34152), only the flake8-rst compatibility not yet. But that is something we don't need to care about for pre-commit. So updating here should be good.

@jorisvandenbossche jorisvandenbossche merged commit 3a15e47 into pandas-dev:master Sep 17, 2020
@dsaxton dsaxton deleted the bump-pre-commit-flake8 branch September 17, 2020 12:13
rhshadrach pushed a commit to rhshadrach/pandas that referenced this pull request Sep 17, 2020
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants