Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork944
Commit9ed904c
committed
Adjust mypy options to work well with mypy 1.9.0
mypy 1.9.0 was very recently released. This makes two changes,in light of that, while avoiding breaking earlier versions:- Change the Python version mypy assumes from 3.7 to 3.8 as configiured in pyproject.toml, because starting in 1.9.0 mypy no longer supports type checking for Python 3.7. It makes sense to keep having a low version checked on local runs of mypy (when not further overridden with `--python-version`). Since the CI mypy steps currently are written not to fail their jobs if they fail (and they do fail, as there remain some mypy errors that are neither fixed nor suppressed), mypy status from CI is not obvious, and it may be that the main way mypy is actually used when developing GitPython is locally. But keeping it down to 3.7 prints a warning and falls back to the version of Python that is used to run mypy, starting in mypy 1.9.0.- Have each CI job that runs mypy do so for the Python version that job exists to test. (This is already the case for the *platform* that job exists to test, because the platform mypy should check for is not overridden in pyproject.toml.) This is done by passing the test matrix Python version with `--python-version`, which takes priority over the pyproject.toml option (which itself takes priority over the default version selection, which in this case would be the same as what we are turning it back into on CI). This is worthwhile even separately from the changes in mypy 1.9.0. But one of its effects is to make it so the mypy step in the Python 3.7 test jobs still checks Python 3.7 (so the results for 3.7, which GitPython has not yet dropped support for) can still be examined. This works becuase the latest version of mypy that can *run* on 3.7, which pip selects automatically, *does* support type-checking for 3.7.1 parent87b314e commit9ed904c
2 files changed
+2
-2
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
91 |
| - | |
| 91 | + | |
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
0 commit comments
Comments
(0)