Closed jdbocarsly closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 67.16%. Comparing base (
a25aeab
) to head (6510ac3
).
0 | 40 | 0 | 0 | 0 |
Details:
Merge 6510ac3f28730fcafd3c29a267ef968ef1822109 into a25aeab677e1b919fd72a985bb49... | |||
Project: datalab | Commit: 1d65bf8889 ℹ️ |
||
Status: Passed | Duration: 01:57 💡 | ||
Started: Jun 21, 2024 4:39 AM | Ended: Jun 21, 2024 4:41 AM |
This PR (hopefully) fixes two issues with our pre-commit
The
generate-schemas
hook usedrepo:local
andlanguage:python
, which allows it to run code within our pipenv. However, this means that ifpre-commit
is ever run from outside the pydatalab virtual environment, it will instead attempt to run the code in the system environment, and fail. This can happen if, for example, the user tries to rungit commit
without being in the pydatalab pipenv shell or typingpipenv run git commit
. The change here uses thelanguage:system
option and a bash one-liner to manually ensure thatgenerate-schemas
is always run in the correctpipenv
.Recently mypy started breaking with the mysterious
AssertionError: Internal error: unresolved placeholder type None
. This seems to be related to using thetype-all
requirement in our mypy pre-commit hook. Here, I replace it with explicity requirements for the type stubs we use:types-python-dateutil
types-requests
types-paramiko