Commit c6d16d0
committed
Start on fixing AutoInterrupt/CatFileContentStream aliases
This uses `TypeAlias` from the `typing` module, to make it so the
assignment statments introduced in #2037 (to set `Git.AutoInterrupt`
and `Git.CatFileContentStream` to nonpublic module-level
implementations `_AutoInterrupt` and `_CatFileContentStream`) are
treated by `mypy` as type aliases rather than as class variables.
For details on the problem this partially fixes, see #2038 and:
https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
The fix won't work in this form, however, because it attempts to
import `TypeAlias` unconditionally from the standard-library
`typing` module, which only gained it in Python 3.10.1 parent 1e463d4 commit c6d16d0
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
952 | 953 | | |
953 | 954 | | |
954 | 955 | | |
955 | | - | |
| 956 | + | |
956 | 957 | | |
957 | | - | |
| 958 | + | |
958 | 959 | | |
959 | 960 | | |
960 | 961 | | |
| |||
0 commit comments