Closed TheCleric closed 6 months ago
Where was the note about trying it before? I don't recall what the problem was. That performance is a bit of a bummer, and might be enough of a problem in itself...
Where was the note about trying it before? I don't recall what the problem was. That performance is a bit of a bummer, and might be enough of a problem in itself...
At the bottom of .pre-commit-config.yaml
:
# Tried and Failed
#
# 1. I tried doing mypy too, but it was a mess because it runs in its own
# isolated environment, that lacks all our dependencies.
Got it. That's not horrible, but it's annoying to have to maintain the dependencies properly in both places. On the other hand, it's nice to have mypy running automatically, and I've certainly noticed I have a tendency not to bother with it until it crashes.
I'm +1 on adding it here experimentally. We can see what people think, unless somebody chimes in to be -1 on it.
@mlissner just so I'm clear, does that mean to go ahead and submit a PR and get feedback then, or wait for feedback here?
Yeah, I think that's a good move. I'm +1, nobody else -1'ed it. Big Cases is by design a bit of a playground to see how things go before moving them over to CourtListener, so, yeah, let's go for it!
I noticed that mypy was not running on the pre-commit hook and a note saying it had been tried before without success. I experimented with what it would take to do this and was successful in getting it working. However I wanted to gauge the interest in adding this, since it comes with a few downsides that I think are important to think through.
Upsides
Downsides
.py
file went from .68s to 1.11s, for two.py
files it goes from .73s to 2.71s.pre-commit-config.yaml
since mypy runs in an isolated environment for pre-commit. It ends up looking like this: