-
Notifications
You must be signed in to change notification settings - Fork 10
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
Check formatting with pre-commit in continuous integration GitHub Actions #625
Comments
Also upgrades mypy and fixes formatting issues Closes biglocalnews#625
Also upgrades mypy and fixes formatting issues Closes biglocalnews#625
I've also run into problems I think with warn-transformer where the CI/CT routine running the same programs catches stuff that the command line doesn't. Also have run into conflicts between these things, I think specifically around whitespace around operators. It's infuriating and seems to harm more often than helping. I could probably adapt the warn-transformer CI/CT routines here pretty easily, but I'm quite wary of introducing a blocker to actual production until I can get the old code cleaned up. |
I want to make sure nothing else is going to be a blocker with moving this to production, but I hope to implement this soon. Thanks for calling it out, @chriszs ! |
(And also, it's almost certainly entirely my fault. I'm sorry!) |
I framed the issue and PR this way because I see it as a process issue, not anyone's personal failing, which does mean the solution is a little more far-reaching and harder to immediately accept, but should solve it once and for all (knock wood). |
mypy is throwing quite a few errors visible with
|
Also upgrades mypy and fixes formatting issues Closes biglocalnews#625
I was only able to reproduce after I added additional type stubs for Beautiful Soup 4 and openpyxl. Did an attempt to fix those issues, but it seems like tests are now failing. Have converted my PR to draft. |
Have now fixed some versioning issues and the PR is ready for review. |
While testing #623 I noticed
pipenv run pre-commit run --all
modified a bunch of files formatted with Black, isort, pyupgrade and it flagged a potential mypy issue (which seems to go away when I upgrade mypy). Apparently some linting and formatting issues have crept into the codebase, which could be because we're not enforcing pre-commit with a GitHub Action. Instead, there are steps for linting, which calls Flake8, and type checking, which calls mypy, but CI doesn't check Black, isort or pyuprade formatting.It's a little bit of a mystery to me why the
mypy
step completes successfully when pre-commitmypy
doesn't, but when I upgraded both the mypy pre-commit step and the mypy installed by Pipenv to 1.9.0 from 0.991 the supposed error went away (it seemed erroneous to begin with).The text was updated successfully, but these errors were encountered: