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

[CI] Fix mypy linting #406

Merged
merged 4 commits into from
Apr 5, 2024
Merged

[CI] Fix mypy linting #406

merged 4 commits into from
Apr 5, 2024

Conversation

antonymilne
Copy link
Contributor

@antonymilne antonymilne commented Apr 5, 2024

Description

#397 bumped our pre-commit mypy from 1.8.0 to 1.9.0, which seemed to flag new errors that were still there even after reversion to 0.18.0 in #403.

The reason for these new errors was not actually the change to mypy version but that there was a new pydantic release at about the same time. Pinning the pydantic version used by mypy fixes this.

There is no caching in our CI. There is caching on pre-commit.ci but it works well and will always be running the correct version specified in our .pre-commit-config.yaml. So both our CI and pre-commit.ci are still perfect sources of truth and working correctly. Behaviour locally should be the identical to these, but just in case it's not then pre-commit clean should fix it by clearing your local cache.

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

@antonymilne antonymilne changed the title Skip vale but not mypy [CI] Fix mypy linting Apr 5, 2024
@@ -121,3 +125,4 @@ ci:
- bandit
- mypy
- gitleaks
- vale
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI @maxschulz-COL @stichbury this should have been on the skip list for https://pre-commit.ci/ already, because vale just flags errors rather than fixing them. The only things we run on pre-commit.ci are things that can fix stuff.

@antonymilne antonymilne marked this pull request as ready for review April 5, 2024 10:19
@antonymilne antonymilne mentioned this pull request Apr 5, 2024
1 task
@antonymilne antonymilne enabled auto-merge (squash) April 5, 2024 10:21
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

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

Ahh, amazing!! 🚀

@antonymilne antonymilne merged commit dcbe2dc into main Apr 5, 2024
34 checks passed
@antonymilne antonymilne deleted the ci/fix-mypy branch April 5, 2024 10:24
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.

2 participants