Skip to content

Conversation

hamdanal
Copy link
Collaborator

@hamdanal hamdanal commented May 6, 2023

The two files got out of sync after #15167

(Explain how this PR changes mypy.)

@hamdanal
Copy link
Collaborator Author

hamdanal commented May 6, 2023

flake8 v6.0.0 doesn't support python 3.7 :/

@JelleZijlstra
Copy link
Member

We should probably go back to flake8 5 in that case.

@AlexWaygood
Copy link
Member

AlexWaygood commented May 6, 2023

We should probably go back to flake8 5 in that case.

And add a comment to .pre-commit-config.yaml saying why we're sticking on flake8 v5!

@hamdanal
Copy link
Collaborator Author

hamdanal commented May 6, 2023

OK isort says hi now :D

@@ -4,11 +4,11 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0 # must match test-requirements.txt
rev: 5.11.5 # must match test-requirements.txt (cannot use version 2.12 until python 3.7 support is dropped)
Copy link
Member

Choose a reason for hiding this comment

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

:)

Suggested change
rev: 5.11.5 # must match test-requirements.txt (cannot use version 2.12 until python 3.7 support is dropped)
rev: 5.11.5 # must match test-requirements.txt (cannot use version 5.12 until python 3.7 support is dropped)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry pushed before your comment :/

@JelleZijlstra JelleZijlstra self-assigned this May 6, 2023
@hamdanal
Copy link
Collaborator Author

hamdanal commented May 6, 2023

It is probably better to run the linting CI on a newer version of python so that you don't have to deal with this situation anymore. Do you want me to make a PR or maybe update this one?

@AlexWaygood
Copy link
Member

It is probably better to run the linting CI on a newer version of python so that you don't have to deal with this situation anymore.

Yeah, just because we support Python 3.7 doesn't mean that we support the project being linted on Python 3.7. So I think that would be fine, and would make the situation easier

@AlexWaygood
Copy link
Member

You could also update the pinned versions of flake8-bugbear and flake8-noqa. (There are no new hits from either of them.)

If we stick with flake8 v5, we can't upgrade to the latest version of flake8-bugbear (23.3.23), which requires flake8 v6, so we can only upgrade to flake8-bugbear==23.3.12. flake8-noqa can be upgraded to the latest version (1.3.1).

@hamdanal
Copy link
Collaborator Author

hamdanal commented May 6, 2023

It is probably better to run the linting CI on a newer version of python so that you don't have to deal with this situation anymore.

Yeah, just because we support Python 3.7 doesn't mean that we support the project being linted on Python 3.7. So I think that would be fine, and would make the situation easier

Do you propose that I change it in this PR or a separate one?

@AlexWaygood
Copy link
Member

AlexWaygood commented May 6, 2023

Do you propose that I change it in this PR or a separate one?

I guess a separate PR maybe makes more sense since we'd be changing our testing setup (and this PR is fixing the setup rather than changing how it works) — but no strong opinion either way

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2023

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JelleZijlstra JelleZijlstra merged commit b69060a into python:master May 6, 2023
@hamdanal hamdanal deleted the patch-1 branch May 6, 2023 15:36
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.

3 participants