Add mypy cache-fix skill documentation#6971
Conversation
| description: >- | ||
| Diagnose and fix mypy pre-commit failures in this repo. Use when: mypy hook | ||
| crashes with INTERNAL ERROR, mypy exits with code 2, mypy fails silently, or | ||
| you suspect mypy cache corruption after seeing sqlite3 DatabaseError. |
There was a problem hiding this comment.
I've never seen this, how often does this happen? Is it really worth a skill? 🤔
There was a problem hiding this comment.
It's possible its just a devcontainer issue but I see it all the time. I think maybe it happens on rebases? I'm not sure why. But like after you asked me to push this to another PR when I came back to the other PR it immediately ran into it again. This time it fixed it itself instead of trying to resort to no-verify commits like it did before.
I didn't really think there was a significant cost to a skill so I had it write it up. If there is or this is just a me problem I can just leave it locally only.
There was a problem hiding this comment.
Hm, it appears mypy 2.0 and newer switched to SQLite (python/mypy#21041).
I've dived into possible causes a bit, and most likely this is related to how we call mypy from pre-commit hooks. python/mypy#13916 has some good hints how to call mypy best.
I've come up with a new PR to address this: #6977. I think with that this skill should not be required anymore.
| description: >- | ||
| Diagnose and fix mypy pre-commit failures in this repo. Use when: mypy hook | ||
| crashes with INTERNAL ERROR, mypy exits with code 2, mypy fails silently, or | ||
| you suspect mypy cache corruption after seeing sqlite3 DatabaseError. |
There was a problem hiding this comment.
Hm, it appears mypy 2.0 and newer switched to SQLite (python/mypy#21041).
I've dived into possible causes a bit, and most likely this is related to how we call mypy from pre-commit hooks. python/mypy#13916 has some good hints how to call mypy best.
I've come up with a new PR to address this: #6977. I think with that this skill should not be required anymore.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Ok. Lets just leave this in draft for a bit to see if that addresses it, if so we can close. Also I don't mind just having this as a local skill if this is something I have to deal with a bunch but no one else does. I just want copilot to stop doing so many no-verify commits 😆 |
Proposed change
Add a repository skill document at
.github/skills/mypy-cache-fix/SKILL.mddescribing how to diagnose and fix intermittent mypy internal errors caused by cache corruption.Type of change
Additional information
Checklist
ruff format supervisor tests)If API endpoints or add-on configuration are added/changed: