Commit b35dea9
committed
refactor: use unquoted modern type annotations in version template
Remove quotes from type annotations. With 'from __future__ import annotations',
all annotations are automatically deferred, so no quotes needed.
Changes:
- vcs-versioning/src/vcs_versioning/_dump_version.py:
- tuple[int | str, ...] instead of "tuple[int | str, ...]"
- str | None instead of "str | None"
- Cleaner, more readable syntax
- Works with mypy 1.11.2 checking Python 3.8
Result: Simpler, cleaner generated version files using modern Python syntax.1 parent c1a78b3 commit b35dea9
File tree
2 files changed
+9
-16
lines changed- setuptools-scm/testing_scm
- vcs-versioning/src/vcs_versioning
2 files changed
+9
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 34 | | |
43 | 35 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
48 | 40 | | |
49 | 41 | | |
50 | 42 | | |
| |||
0 commit comments